November 2018
Beginner
230 pages
6h 4m
English
You have already seen an example of using the COPY instruction in the hello-world Dockerfile shown in The FROM instruction section. The COPY instruction is used to copy files and folders into the Docker image being built. The syntax for the COPY instruction is as follows:
# COPY instruction syntaxCOPY [--chown=<user>:<group>] <src>... <dest># Use double quotes for paths containing whitespace)COPY [--chown=<user>:<group>] ["<src>",... "<dest>"]
Note that the --chown parameter is only valid for Linux-based containers. Without the --chown parameter, the owner ID and group ID will both be set to 0.
The <src> or source is a filename or folder path and is interpreted to be relative to the context of the build. We will talk ...
Read now
Unlock full access