Invalid reference format docker while setting up development environment

I was trying to build the development environment for the Moby project on Github following these instructions
However, when I was in the task 2.4 to build a development environment image and run it in a container, I’ve encountered this error rather than a successful message

docker run --rm -i --privileged  -e DOCKER_CROSSPLATFORMS -e BUILD_APT_MIRROR -e BUILDFLAGS -e KEEPBUNDLE -e DOCKER_BUILD_ARGS -e DOCKER_BUILD_GOGC -e DOCKER_BUILD_PKGS -e DOCKER_BASH_COMPLETION_PATH -e DOCKER_CLI_PATH -e DOCKER_DEBUG -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT -e DOCKER_GRAPHDRIVER -e DOCKER_INCREMENTAL_BINARY -e DOCKER_LDFLAGS -e DOCKER_PORT -e DOCKER_REMAP_ROOT -e DOCKER_STORAGE_OPTS -e DOCKER_USERLANDPROXY -e TEST_INTEGRATION_DIR -e TESTDIRS -e TESTFLAGS -e TIMEOUT -e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY -e http_proxy -e https_proxy -e no_proxy -e VERSION -e PLATFORM -v "/Users/namnguyen/Self-taught/Open source/moby-fork/.:/go/src/" -v /Users/namnguyen/Self-taught/Open source/moby-fork/.git:/go/src/ -v "dockerdev-go-pkg-cache-gopath:/go/pkg" -v "dockerdev-go-pkg-cache-goroot-linux_amd64:/usr/local/go/pkg/linux_amd64" -v "dockerdev-go-pkg-cache-goroot-linux_amd64_netgo:/usr/local/go/pkg/linux_amd64_netgo"    -t "docker-dev:dry-run-test" bash

docker: invalid reference format.
See ‘docker run --help’.
make: *** [shell] Error 125

I am using Mac OSX, and my docker version is 17.12.0-ce

Has anyone ever experienced something similar and can guide me through it? Thanks


I believe the issue is that you have a space in your path, and you haven’t double-quoted one of the bind-mount options, so docker run thinks you’re trying to run an image named source/moby-fork/.git:/go/src/ (which is obviously not what you wanted!)