build target

The named stage of a multi-stage Dockerfile you ask docker build to stop at.

In more detail

docker build --target test . builds up to the stage named test, for example to run tests in CI, while a normal build produces the final stage. One Dockerfile can then serve development, testing and production.

Example

docker build --target test -t taskapi:test .

Related terms

Related guides

Taught in

References

Certification courses