build context

The set of files you hand to docker build, usually the current directory given as the final dot.

In more detail

Only files in the context can be copied into the image, and the whole context (minus .dockerignore entries) is sent to the builder, so a stray node_modules folder or .git directory makes builds slow and can leak secrets into the image. Not the same as a Docker context, which picks a daemon.

Example

docker build -t taskapi:0.1 .   # the dot is the context

Related terms

Taught in

References

Certification courses