I'm starting with a docker image that is already built. I would like to do this
How can this be achieved. It looks like if i run the following commands the file doesn't end up in the container
Any idea how this can be achieved ?
You will have to create a new image from a Dockerfile that inherit from the one that is already built, and the use the COPY tag:
Dockerfile
FROM my_image
COPY file /tmp/file
Finally, build that new Dockerfile:
$ docker build -t new_image .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With