dockerfile copy multiple files code example

Example 1: copy file to docker container

docker cp foo.txt mycontainer:/foo.txt

Example 2: dockerfile copy specific files

COPY ["__BUILD_NUMBER", "README.md", "gulpfile", "another_file", "./"]
		All the files and folders, the last is destination

Example 3: multiple copy dockerfile

COPY README.md  package.json gulpfile.js __BUILD_NUMBER ./

Example 4: multiple copy dockerfile

COPY [
    "__BUILD_NUMBER ./",
    "README.md ./",
    "gulpfile ./",
    "another_file ./",
]

Tags:

Misc Example