22:description: API Documentation for Docker
33:keywords: API, Docker, rcli, REST, documentation
44
5+ :orphan:
6+
57======================
68Docker Remote API v1.4
79======================
@@ -12,7 +14,7 @@ Docker Remote API v1.4
1214=====================
1315
1416- The Remote API is replacing rcli
15- - Default port in the docker deamon is 4243
17+ - Default port in the docker daemon is 4243
1618- The API tends to be REST, but for some complex commands, like attach or pull, the HTTP connection is hijacked to transport stdout stdin and stderr
1719
18202. Endpoints
@@ -765,29 +767,29 @@ Push an image on the registry
765767
766768.. http :post :: /images/(name)/push
767769
768- Push the image ``name `` on the registry
770+ Push the image ``name `` on the registry
769771
770- **Example request **:
772+ **Example request **:
771773
772- .. sourcecode :: http
774+ .. sourcecode :: http
773775
774- POST /images/test/push HTTP/1.1
775- {{ authConfig }}
776+ POST /images/test/push HTTP/1.1
777+ {{ authConfig }}
776778
777- **Example response **:
779+ **Example response **:
778780
779- .. sourcecode :: http
781+ .. sourcecode :: http
780782
781- HTTP/1.1 200 OK
782- Content-Type: application/json
783+ HTTP/1.1 200 OK
784+ Content-Type: application/json
783785
784- {"status":"Pushing..."}
785- {"status":"Pushing", "progress":"1/? (n/a)"}
786- {"error":"Invalid..."}
787- ...
786+ {"status":"Pushing..."}
787+ {"status":"Pushing", "progress":"1/? (n/a)"}
788+ {"error":"Invalid..."}
789+ ...
788790
789- :query registry: the registry you wan to push, optional
790- :statuscode 200: no error
791+ :query registry: the registry you wan to push, optional
792+ :statuscode 200: no error
791793 :statuscode 404: no such image
792794 :statuscode 500: server error
793795
@@ -900,37 +902,37 @@ Build an image from Dockerfile via stdin
900902
901903.. http :post :: /build
902904
903- Build an image from Dockerfile via stdin
905+ Build an image from Dockerfile via stdin
904906
905- **Example request **:
907+ **Example request **:
906908
907- .. sourcecode :: http
909+ .. sourcecode :: http
908910
909- POST /build HTTP/1.1
910-
911- {{ STREAM }}
911+ POST /build HTTP/1.1
912912
913- ** Example response **:
913+ {{ STREAM }}
914914
915- .. sourcecode :: http
915+ ** Example response **:
916916
917- HTTP/1.1 200 OK
918-
919- {{ STREAM }}
917+ .. sourcecode :: http
918+
919+ HTTP/1.1 200 OK
920920
921+ {{ STREAM }}
921922
922- The stream must be a tar archive compressed with one of the following algorithms:
923- identity (no compression), gzip, bzip2, xz. The archive must include a file called
924- `Dockerfile ` at its root. It may include any number of other files, which will be
925- accessible in the build context (See the ADD build command).
926923
927- The Content-type header should be set to "application/tar".
924+ The stream must be a tar archive compressed with one of the following algorithms:
925+ identity (no compression), gzip, bzip2, xz. The archive must include a file called
926+ `Dockerfile ` at its root. It may include any number of other files, which will be
927+ accessible in the build context (See the ADD build command).
928+
929+ The Content-type header should be set to "application/tar".
928930
929931 :query t: repository name (and optionally a tag) to be applied to the resulting image in case of success
930932 :query q: suppress verbose build output
931933 :query nocache: do not use the cache when building the image
932934 :statuscode 200: no error
933- :statuscode 500: server error
935+ :statuscode 500: server error
934936
935937
936938Check auth configuration
@@ -1033,22 +1035,22 @@ Create a new image from a container's changes
10331035
10341036.. http :post :: /commit
10351037
1036- Create a new image from a container's changes
1038+ Create a new image from a container's changes
10371039
1038- **Example request **:
1040+ **Example request **:
10391041
1040- .. sourcecode :: http
1042+ .. sourcecode :: http
10411043
1042- POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
1044+ POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
10431045
10441046 **Example response **:
10451047
1046- .. sourcecode :: http
1048+ .. sourcecode :: http
10471049
1048- HTTP/1.1 201 OK
1049- Content-Type: application/vnd.docker.raw-stream
1050+ HTTP/1.1 201 OK
1051+ Content-Type: application/vnd.docker.raw-stream
10501052
1051- {"Id":"596069db4bf5"}
1053+ {"Id":"596069db4bf5"}
10521054
10531055 :query container: source container
10541056 :query repo: repository
@@ -1060,7 +1062,6 @@ Create a new image from a container's changes
10601062 :statuscode 404: no such container
10611063 :statuscode 500: server error
10621064
1063-
106410653. Going further
10651066================
10661067
@@ -1089,6 +1090,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
10891090-----------------
10901091
10911092To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1092-
1093- docker -d -H="192.168.1.9:4243" -api-enable-cors
1093+
1094+ .. code-block :: bash
1095+
1096+ docker -d -H=" 192.168.1.9:4243" -api-enable-cors
10941097
0 commit comments