I am writing a Dockerfile
to build an application. I know that you can copy files out of the container manually with
docker cp <containerId>:/file/path/within/container /host/path/target
(see Copying files from Docker container to host), but I would like to just run
docker build
and have it dump the build artifacts created by my Dockerfile
somewhere on my host file system.
Is there a command I can use within the Dockerfile to copy out of the container and into the host? Like the opposite of COPY
?