Search code examples
linuxmacosdockercompilationowncloud

What is meant by this weird docker command?


Following the docs on compiling the OwnCloud sync client I'm trying to build the client for Windows. I managed to build the docker image and according to the docs I now need to run the following command to start compiling:

docker run owncloud-client-win32:2.1 -v "$PWD:/home/jenkins/client" admin/win32/docker/build.sh $(id -u)

But I get the this error:

docker: Error response from daemon: Container command '-v' not found or does not exist..

Looking through the docs on docker run I don't see any mentioning of the -v command, so that makes sense. I wonder what the devs actually meant by this though.

Does anybody know what I'm doing wrong here and how I could possibly proceed? All tips are welcome!


Solution

  • this is the right syntax (I guess):

    docker run -v "$PWD:/home/jenkins/client" owncloud-client-win32:2.1 admin/win32/docker/build.sh $(id -u) 
    

    the -v argument is for setting a volume, or in other words, a folder that will survive to container deletion (except if you ran docker rm -v container to remove it).

    More on docker volumes here.