Docker volume mounting of build directory is not working

I have the following line in my .gitlab-ci.yml - docker run --rm -v "$CI_PROJECT_DIR":/app -w /app golang:1.6 build which does not work.

After replacing the docker build with a simple "ls" I found that the directory is empty.

After mounting "/" instead of the project dir, it did work (there was something in the dir), but the actual build directory was still empty.

I can only assume that the project directories are on some different filesystem are some other technical problem...