issue with sharing files to the container

Issue #57 resolved
0000cctv created an issue

I tried to share my file to the container, so I input docker run -ti -v $(pwd):/home/fenics/shared quay.io/fenicsproject/stable

the current directory is under C:\Users, but I got the following result:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error parsing reference: ":/home/fenics/shared" is not a valid repository/tag. See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

I'm using newest version of windows10 and windows powershell to run fenics, and with docker for windows. How do I solve this problem?

Comments (4)

  1. Jack Hale

    All of the copy and paste commands are designed for UNIX sh-compatible terminals. Powershell is not sh-compatible.

    I can't test this as I don't have a Windows 10 machine but something like:

    docker run -ti -v C:\Users\youruser\myproject:/home/fenics/shared quay.io/fenicsproject/stable
    

    should work. Let me know if it does so I can add something into the documentation. If you know how to do the $(pwd) trick on Powershell that would also be great.

    A nice alternative is running Ubuntu for Windows and pointing the Ubuntu Docker client at the server: http://serverfault.com/a/790806

  2. 0000cctv reporter

    The above code works after manually setting C drivers to be shared drive in Docker. The problem is solved.

  3. Log in to comment