In Dockerfile how to copy file from network drive
I have a file hosted (can’t change that) at
Dockerfile I would like to:
COPY //somenetwork/somefiles/myfile /opt/files/file
Is there anyway to achieve that with
One Solution collect form web for “In Dockerfile how to copy file from network drive”
Not easily, considering ADD or COPY uses the
Dockerfile context (the current folder or below) to seek their resources.
It would be easier to
cp that file first to the
Dockerfile folder (before a
docker build .), and leave in said
COPY myfile /opt/files/file directive.
Or you could run the container, and use a
docker cp //somenetwork/somefiles/myfile /opt/files/file to add that file at rintime