copy file to docker container in dockerfile code example Example: copy file to docker container docker cp foo.txt mycontainer:/foo.txt