DOCKER Course

COPY

Go back

Copy a file from a source to a destination with

  • src: one or more sources
  • dest: a destination (folder)
  • --chown={user}:{group}: Linux-only, set the user and the group of the dest file
COPY src1 src2 ... srcn dest
# or
COPY ["src", ...,"dest"]
# or
COPY --chown={user}:{group} src1 src2 ... srcn dest

Example

# copy all files in current directory so WORKDIR
# to /usr/project/
COPY . /usr/project/