diff --git a/docs/reference/api/docker_remote_api.md b/docs/reference/api/docker_remote_api.md index 61adcad43c..30a983becb 100644 --- a/docs/reference/api/docker_remote_api.md +++ b/docs/reference/api/docker_remote_api.md @@ -123,6 +123,7 @@ This section lists each version from latest to oldest. Each listing includes a * `POST /containers/create/` and `POST /containers/(name)/update` now validates restart policies. * `POST /containers/create` now validates IPAMConfig in NetworkingConfig, and returns error for invalid IPv4 and IPv6 addresses (`--ip` and `--ip6` in `docker create/run`). * `POST /containers/create` now takes a `Mounts` field in `HostConfig` which replaces `Binds` and `Volumes`. *note*: `Binds` and `Volumes` are still available but are exclusive with `Mounts` +* `POST /build` now performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. Note that this change is _unversioned_ and applied to all API versions. ### v1.24 API changes diff --git a/docs/reference/api/docker_remote_api_v1.18.md b/docs/reference/api/docker_remote_api_v1.18.md index 3daf78850e..344ce44f49 100644 --- a/docs/reference/api/docker_remote_api_v1.18.md +++ b/docs/reference/api/docker_remote_api_v1.18.md @@ -1201,6 +1201,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.19.md b/docs/reference/api/docker_remote_api_v1.19.md index 94eea6eb97..bf9589e170 100644 --- a/docs/reference/api/docker_remote_api_v1.19.md +++ b/docs/reference/api/docker_remote_api_v1.19.md @@ -1243,6 +1243,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.20.md b/docs/reference/api/docker_remote_api_v1.20.md index c614d0647e..58a44e8da0 100644 --- a/docs/reference/api/docker_remote_api_v1.20.md +++ b/docs/reference/api/docker_remote_api_v1.20.md @@ -1370,6 +1370,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.21.md b/docs/reference/api/docker_remote_api_v1.21.md index a05cb5a964..bcc2262bcc 100644 --- a/docs/reference/api/docker_remote_api_v1.21.md +++ b/docs/reference/api/docker_remote_api_v1.21.md @@ -1448,6 +1448,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.22.md b/docs/reference/api/docker_remote_api_v1.22.md index 8f03a7b674..7fdb27c2fd 100644 --- a/docs/reference/api/docker_remote_api_v1.22.md +++ b/docs/reference/api/docker_remote_api_v1.22.md @@ -1625,6 +1625,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.23.md b/docs/reference/api/docker_remote_api_v1.23.md index 9817eb5913..a24d84219a 100644 --- a/docs/reference/api/docker_remote_api_v1.23.md +++ b/docs/reference/api/docker_remote_api_v1.23.md @@ -1658,6 +1658,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.24.md b/docs/reference/api/docker_remote_api_v1.24.md index f5e6c6580c..0792646a20 100644 --- a/docs/reference/api/docker_remote_api_v1.24.md +++ b/docs/reference/api/docker_remote_api_v1.24.md @@ -1661,6 +1661,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/api/docker_remote_api_v1.25.md b/docs/reference/api/docker_remote_api_v1.25.md index 11e5017fc5..f13a662ebb 100644 --- a/docs/reference/api/docker_remote_api_v1.25.md +++ b/docs/reference/api/docker_remote_api_v1.25.md @@ -1682,6 +1682,10 @@ The archive may include any number of other files, which are accessible in the build context (See the [*ADD build command*](../../reference/builder.md#add)). +The Docker daemon performs a preliminary validation of the `Dockerfile` before +starting the build, and returns an error if the syntax is incorrect. After that, +each instruction is run one-by-one until the ID of the new image is output. + The build is canceled if the client drops the connection by quitting or being killed. diff --git a/docs/reference/builder.md b/docs/reference/builder.md index cd94170807..53b0532c1a 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -68,6 +68,13 @@ add multiple `-t` parameters when you run the `build` command: $ docker build -t shykes/myapp:1.0.2 -t shykes/myapp:latest . +Before the Docker daemon runs the instructions in the `Dockerfile`, it performs +a preliminary validation of the `Dockerfile` and returns an error if the syntax is incorrect: + + $ docker build -t test/myapp . + Sending build context to Docker daemon 2.048 kB + Error response from daemon: Unknown instruction: RUNCMD + The Docker daemon runs the instructions in the `Dockerfile` one-by-one, committing the result of each instruction to a new image if necessary, before finally outputting the ID of your