Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Docker does not handle symbolic links outside the context by default. When building a Docker image, only the files and directories inside the build context are copied into the image. Any symbolic links to files or directories outside the build context will not be resolved by Docker.

However, it is possible to explicitly specify files or directories outside the build context using the ADD or COPY instruction with an absolute path. In this case, Docker will follow the symbolic links and copy the target files or directories into the image.

It is important to note that using absolute paths outside the build context can potentially cause security risks, as sensitive files or directories outside the build context may be copied into the image. Therefore, it is recommended to use relative paths within the build context whenever possible.