Hi Guys, a question about COPY command inside Containerfile
is it mandatory that the file I want to copy be in the same folder as the Containerfile/Dockerfile file?
I ask that because in my Containerfile I put the instruction COPY
/home/user/Downloads/file.zip /opt/, however when I run the command podman build, I receive an error message: no such file or directory , however, the file exists in the folder /home/user/Downloads/
Hi RogerioLSantos,
Where is your dockerfile exists?
the folder /home/user/Downloads/file.zip should be into the same context as of dockerfile. Please go through the github issue which was raised for the same.
https://github.com/moby/moby/issues/4592
~Vikas Sharma
Hi RogerioLSantos,
Where is your dockerfile exists?
the folder /home/user/Downloads/file.zip should be into the same context as of dockerfile. Please go through the github issue which was raised for the same.
https://github.com/moby/moby/issues/4592
~Vikas Sharma
Hi vikassharma, my /home/user/Downloads/file.zip is in a different context
I thought that COPY would read any folder in the host.
In this structure works
However, I was trying to use a folder outside of this context, because I thought that COPY has visibility of all folders in the host.
You can't COPY a zip! You need ADD! And add does not work with zip, but with .tar
And you need all of it in the current dir where you execute the build command.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.