I'm using a docker container for compiling a code that I many not necessarily want to dockerize. I have set up an image with the necessary build tools but I would like to get the compiled file somehow out of the container without using the docker cp container:/file host/file
command. In other words, I would like automate this process so that after build is completed, the generated files would be copied to the host.
Can the copy command in Dockerfile COPY <source> <target>
be used for this purpose? If no, then what is the solution?