It seems odd to have such an important API hidden under 'misc'.
While in there I noticed that during the "-f Dockerfile" PR I changed
the query param from f to dockerfile and missed this one spot in the docs.
Signed-off-by: Doug Davis <dug@us.ibm.com>
| ... | ... |
@@ -848,6 +848,60 @@ Query Parameters: |
| 848 | 848 |
- **filters** – a json encoded value of the filters (a map[string][]string) to process on the images list. Available filters: |
| 849 | 849 |
- dangling=true |
| 850 | 850 |
|
| 851 |
+### Build image from a Dockerfile |
|
| 852 |
+ |
|
| 853 |
+`POST /build` |
|
| 854 |
+ |
|
| 855 |
+Build an image from a Dockerfile |
|
| 856 |
+ |
|
| 857 |
+**Example request**: |
|
| 858 |
+ |
|
| 859 |
+ POST /build HTTP/1.1 |
|
| 860 |
+ |
|
| 861 |
+ {{ TAR STREAM }}
|
|
| 862 |
+ |
|
| 863 |
+**Example response**: |
|
| 864 |
+ |
|
| 865 |
+ HTTP/1.1 200 OK |
|
| 866 |
+ Content-Type: application/json |
|
| 867 |
+ |
|
| 868 |
+ {"stream": "Step 1..."}
|
|
| 869 |
+ {"stream": "..."}
|
|
| 870 |
+ {"error": "Error...", "errorDetail": {"code": 123, "message": "Error..."}}
|
|
| 871 |
+ |
|
| 872 |
+The input stream must be a tar archive compressed with one of the |
|
| 873 |
+following algorithms: identity (no compression), gzip, bzip2, xz. |
|
| 874 |
+ |
|
| 875 |
+The archive must include a build instructions file, typically called |
|
| 876 |
+`Dockerfile` at the root of the archive. The `dockerfile` parameter may be |
|
| 877 |
+used to specify a different build instructions file by having its value be |
|
| 878 |
+the path to the alternate build instructions file to use. |
|
| 879 |
+ |
|
| 880 |
+The archive may include any number of other files, |
|
| 881 |
+which will be accessible in the build context (See the [*ADD build |
|
| 882 |
+command*](/reference/builder/#dockerbuilder)). |
|
| 883 |
+ |
|
| 884 |
+Query Parameters: |
|
| 885 |
+ |
|
| 886 |
+- **dockerfile** - path within the build context to the Dockerfile |
|
| 887 |
+- **t** – repository name (and optionally a tag) to be applied to |
|
| 888 |
+ the resulting image in case of success |
|
| 889 |
+- **q** – suppress verbose build output |
|
| 890 |
+- **nocache** – do not use the cache when building the image |
|
| 891 |
+- **pull** - attempt to pull the image even if an older image exists locally |
|
| 892 |
+- **rm** - remove intermediate containers after a successful build (default behavior) |
|
| 893 |
+- **forcerm** - always remove intermediate containers (includes rm) |
|
| 894 |
+ |
|
| 895 |
+ Request Headers: |
|
| 896 |
+ |
|
| 897 |
+- **Content-type** – should be set to `"application/tar"`. |
|
| 898 |
+- **X-Registry-Config** – base64-encoded ConfigFile objec |
|
| 899 |
+ |
|
| 900 |
+Status Codes: |
|
| 901 |
+ |
|
| 902 |
+- **200** – no error |
|
| 903 |
+- **500** – server error |
|
| 904 |
+ |
|
| 851 | 905 |
### Create an image |
| 852 | 906 |
|
| 853 | 907 |
`POST /images/create` |
| ... | ... |
@@ -1136,60 +1190,6 @@ Status Codes: |
| 1136 | 1136 |
|
| 1137 | 1137 |
## 2.3 Misc |
| 1138 | 1138 |
|
| 1139 |
-### Build an image from Dockerfile via stdin |
|
| 1140 |
- |
|
| 1141 |
-`POST /build` |
|
| 1142 |
- |
|
| 1143 |
-Build an image from Dockerfile via stdin |
|
| 1144 |
- |
|
| 1145 |
-**Example request**: |
|
| 1146 |
- |
|
| 1147 |
- POST /build HTTP/1.1 |
|
| 1148 |
- |
|
| 1149 |
- {{ TAR STREAM }}
|
|
| 1150 |
- |
|
| 1151 |
-**Example response**: |
|
| 1152 |
- |
|
| 1153 |
- HTTP/1.1 200 OK |
|
| 1154 |
- Content-Type: application/json |
|
| 1155 |
- |
|
| 1156 |
- {"stream": "Step 1..."}
|
|
| 1157 |
- {"stream": "..."}
|
|
| 1158 |
- {"error": "Error...", "errorDetail": {"code": 123, "message": "Error..."}}
|
|
| 1159 |
- |
|
| 1160 |
-The input stream must be a tar archive compressed with one of the |
|
| 1161 |
-following algorithms: identity (no compression), gzip, bzip2, xz. |
|
| 1162 |
- |
|
| 1163 |
-The archive must include a build instructions file, typically called |
|
| 1164 |
-`Dockerfile` at the root of the archive. The `f` parameter may be used |
|
| 1165 |
-to specify a different build instructions file by having its value be |
|
| 1166 |
-the path to the alternate build instructions file to use. |
|
| 1167 |
- |
|
| 1168 |
-The archive may include any number of other files, |
|
| 1169 |
-which will be accessible in the build context (See the [*ADD build |
|
| 1170 |
-command*](/reference/builder/#dockerbuilder)). |
|
| 1171 |
- |
|
| 1172 |
-Query Parameters: |
|
| 1173 |
- |
|
| 1174 |
-- **dockerfile** - path within the build context to the Dockerfile |
|
| 1175 |
-- **t** – repository name (and optionally a tag) to be applied to |
|
| 1176 |
- the resulting image in case of success |
|
| 1177 |
-- **q** – suppress verbose build output |
|
| 1178 |
-- **nocache** – do not use the cache when building the image |
|
| 1179 |
-- **pull** - attempt to pull the image even if an older image exists locally |
|
| 1180 |
-- **rm** - remove intermediate containers after a successful build (default behavior) |
|
| 1181 |
-- **forcerm** - always remove intermediate containers (includes rm) |
|
| 1182 |
- |
|
| 1183 |
- Request Headers: |
|
| 1184 |
- |
|
| 1185 |
-- **Content-type** – should be set to `"application/tar"`. |
|
| 1186 |
-- **X-Registry-Config** – base64-encoded ConfigFile objec |
|
| 1187 |
- |
|
| 1188 |
-Status Codes: |
|
| 1189 |
- |
|
| 1190 |
-- **200** – no error |
|
| 1191 |
-- **500** – server error |
|
| 1192 |
- |
|
| 1193 | 1139 |
### Check auth configuration |
| 1194 | 1140 |
|
| 1195 | 1141 |
`POST /auth` |