Browse code

#1852 Remote API documentation incorrect regarding private registries

Issues addressed:

- Remote API doco refers to "registry" parameter which is not supported
- Neglects to mention "tag" parameter which is supported
- Offers no guidance on pushing to private registries

Changes made:

- As directed in review comments, `registry` removed from all api versions (1.0-1.14)
- Have added documentation for `tag` parameter and guidance on private registries for versions 1.10-1.14 (I have only validated this on .10)

Docker-DCO-1.1-Signed-off-by: Lachlan Coote <lachlan.t.coote@gmail.com> (github: lcoote)

Lachlan Coote authored on 2014/08/01 11:26:32
Showing 15 changed files
... ...
@@ -677,12 +677,6 @@ Push the image `name` on the registry
677 677
 
678 678
         {{ STREAM }}
679 679
 
680
-    Query Parameters:
681
-
682
-     
683
-
684
-    -   **registry** – the registry you wan to push, optional
685
-
686 680
     Status Codes:
687 681
 
688 682
     -   **200** – no error
... ...
@@ -687,12 +687,6 @@ Push the image `name` on the registry
687 687
         {"error":"Invalid..."}
688 688
         ...
689 689
 
690
-    Query Parameters:
691
-
692
-     
693
-
694
-    -   **registry** – the registry you wan to push, optional
695
-
696 690
     Status Codes:
697 691
 
698 692
     -   **200** – no error
... ...
@@ -853,11 +853,20 @@ Push the image `name` on the registry
853 853
         {"error":"Invalid..."}
854 854
         ...
855 855
 
856
+    If you wish to push an image on to a private registry, that image must already have been tagged
857
+    into a repository which references that registry host name and port.  This repository name should 
858
+    then be used in the URL. This mirrors the flow of the CLI.
859
+
860
+    **Example request**:
861
+
862
+        POST /images/registry.acme.com:5000/test/push HTTP/1.1    
863
+    
864
+
856 865
     Query Parameters:
857 866
 
858 867
      
859 868
 
860
-    -   **registry** – the registry you wan to push, optional
869
+    -   **tag** – the tag to associate with the image on the registry, optional
861 870
 
862 871
     Request Headers:
863 872
 
... ...
@@ -861,11 +861,20 @@ Push the image `name` on the registry
861 861
         {"error":"Invalid..."}
862 862
         ...
863 863
 
864
+    If you wish to push an image on to a private registry, that image must already have been tagged
865
+    into a repository which references that registry host name and port.  This repository name should 
866
+    then be used in the URL. This mirrors the flow of the CLI.
867
+
868
+    **Example request**:
869
+
870
+        POST /images/registry.acme.com:5000/test/push HTTP/1.1    
871
+    
872
+
864 873
     Query Parameters:
865 874
 
866 875
      
867 876
 
868
-    -   **registry** – the registry you wan to push, optional
877
+    -   **tag** – the tag to associate with the image on the registry, optional
869 878
 
870 879
     Request Headers:
871 880
 
... ...
@@ -914,11 +914,20 @@ Push the image `name` on the registry
914 914
         {"error":"Invalid..."}
915 915
         ...
916 916
 
917
+    If you wish to push an image on to a private registry, that image must already have been tagged
918
+    into a repository which references that registry host name and port.  This repository name should 
919
+    then be used in the URL. This mirrors the flow of the CLI.
920
+
921
+    **Example request**:
922
+
923
+        POST /images/registry.acme.com:5000/test/push HTTP/1.1    
924
+    
925
+
917 926
     Query Parameters:
918 927
 
919 928
      
920 929
 
921
-    -   **registry** – the registry you wan to push, optional
930
+    -   **tag** – the tag to associate with the image on the registry, optional
922 931
 
923 932
     Request Headers:
924 933
 
... ...
@@ -914,11 +914,20 @@ Push the image `name` on the registry
914 914
         {"error":"Invalid..."}
915 915
         ...
916 916
 
917
+    If you wish to push an image on to a private registry, that image must already have been tagged
918
+    into a repository which references that registry host name and port.  This repository name should 
919
+    then be used in the URL. This mirrors the flow of the CLI.
920
+
921
+    **Example request**:
922
+
923
+        POST /images/registry.acme.com:5000/test/push HTTP/1.1    
924
+    
925
+
917 926
     Query Parameters:
918 927
 
919 928
      
920 929
 
921
-    -   **registry** – the registry you wan to push, optional
930
+    -   **tag** – the tag to associate with the image on the registry, optional
922 931
 
923 932
     Request Headers:
924 933
 
... ...
@@ -920,11 +920,20 @@ Push the image `name` on the registry
920 920
         {"error":"Invalid..."}
921 921
         ...
922 922
 
923
+    If you wish to push an image on to a private registry, that image must already have been tagged
924
+    into a repository which references that registry host name and port.  This repository name should 
925
+    then be used in the URL. This mirrors the flow of the CLI.
926
+
927
+    **Example request**:
928
+
929
+        POST /images/registry.acme.com:5000/test/push HTTP/1.1    
930
+    
931
+
923 932
     Query Parameters:
924 933
 
925 934
      
926 935
 
927
-    -   **registry** – the registry you wan to push, optional
936
+    -   **tag** – the tag to associate with the image on the registry, optional
928 937
 
929 938
     Request Headers:
930 939
 
... ...
@@ -706,12 +706,6 @@ Push the image `name` on the registry
706 706
         {"error":"Invalid..."}
707 707
         ...
708 708
 
709
-    Query Parameters:
710
-
711
-     
712
-
713
-    -   **registry** – the registry you wan to push, optional
714
-
715 709
     Status Codes:
716 710
 
717 711
     -   **200** – no error
... ...
@@ -755,12 +755,6 @@ Push the image `name` on the registry
755 755
         {"error":"Invalid..."}
756 756
         ...
757 757
 
758
-    Query Parameters:
759
-
760
-     
761
-
762
-    -   **registry** – the registry you wan to push, optional
763
-
764 758
     Status Codes:
765 759
 
766 760
     -   **200** – no error
... ...
@@ -801,12 +801,6 @@ Push the image `name` on the registry
801 801
     {"status":"Pushing..."} {"status":"Pushing", "progress":"1/? (n/a)"}
802 802
     {"error":"Invalid..."} ...
803 803
 
804
-    Query Parameters:
805
-
806
-     
807
-
808
-    -   **registry** – the registry you wan to push, optional
809
-
810 804
     Status Codes:
811 805
 
812 806
     -   **200** – no error :statuscode 404: no such image :statuscode
... ...
@@ -805,12 +805,6 @@ Push the image `name` on the registry
805 805
     The `X-Registry-Auth` header can be used to
806 806
     include a base64-encoded AuthConfig object.
807 807
 
808
-    Query Parameters:
809
-
810
-     
811
-
812
-    -   **registry** – the registry you wan to push, optional
813
-
814 808
     Status Codes:
815 809
 
816 810
     -   **200** – no error
... ...
@@ -910,12 +910,6 @@ Push the image `name` on the registry
910 910
     > The `X-Registry-Auth` header can be used to
911 911
     > include a base64-encoded AuthConfig object.
912 912
 
913
-    Query Parameters:
914
-
915
-     
916
-
917
-    -   **registry** – the registry you wan to push, optional
918
-
919 913
     Status Codes:
920 914
 
921 915
     -   **200** – no error :statuscode 404: no such image :statuscode
... ...
@@ -828,12 +828,6 @@ Push the image `name` on the registry
828 828
         {"error":"Invalid..."}
829 829
         ...
830 830
 
831
-    Query Parameters:
832
-
833
-     
834
-
835
-    -   **registry** – the registry you wan to push, optional
836
-
837 831
     Request Headers:
838 832
 
839 833
      
... ...
@@ -870,12 +870,6 @@ Push the image `name` on the registry
870 870
         {"error":"Invalid..."}
871 871
         ...
872 872
 
873
-    Query Parameters:
874
-
875
-     
876
-
877
-    -   **registry** – the registry you wan to push, optional
878
-
879 873
     Request Headers:
880 874
 
881 875
      
... ...
@@ -874,12 +874,6 @@ Push the image `name` on the registry
874 874
         {"error":"Invalid..."}
875 875
         ...
876 876
 
877
-    Query Parameters:
878
-
879
-     
880
-
881
-    -   **registry** – the registry you wan to push, optional
882
-
883 877
     Request Headers:
884 878
 
885 879