In Dockerfile how to copy file from network drive

I have a file hosted (can’t change that) at //somenetwork/somefiles/myfile

In my Dockerfile I would like to:

  • Running Appscale on Jelastic
  • Docker : RUN cd … does not work as expected [duplicate]
  • Docker django nginx gunicorn URL dropping port
  • boot2docker shellinit command ended up in error “Error requesting socket: exit status 255”
  • AWS ECS for Glassfish HA architecture
  • Nginx not redirect to https docker ports
  • COPY //somenetwork/somefiles/myfile /opt/files/file

    Is there anyway to achieve that with Dockerfile?
    thanks

  • How to use docker-compose on ovh hosting
  • IBM/secure-gateway-client docker run with the --F (acl file) option
  • Docker 'data only container' being shut down
  • can't write ñ, ä, ë, ü in a ubuntu docker container
  • Docker stops immediately upon running - EOF error
  • Trouble mounting a folder from host onto my docker image
  • 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 Dockerfile a 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

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.