"docker cp" doesn't seem to work in Circle

Because CircleCI doesn’t support “-v” with docker, when using the setup_remote_docker option I’ve been trying to get the “docker cp” workaround listed in https://circleci.com/docs/2.0/building-docker-images/ to work.

Unfortunately, it’s completely broken for me:

bash-4.4# docker --version
Docker version 17.12.1-ce, build 9584b2309e

bash-4.4# docker cp /root/project scala:/
bash-4.4# docker run --volumes-from scala -w /scala -e SBT_OPTS="-Xmx4G -Dsbt.ivy.home=.ivy2 -Divy.home=.ivy2 -Dsbt.boot=.sbt/boot -Dsbt.log.noformat=true" -ti --rm hseeberger/scala-sbt:latest /bin/sh

ls

ls -latr

total 8
drwxr-xr-x 2 root root 4096 Mar 13 13:52 .
drwxr-xr-x 54 root root 4096 Mar 13 13:54 …

If I run this locally (on my laptop) it works fine. It’s as if “docker cp” does nothing and I don’t really know why. Has anyone witnessed/seen this? I feel like I’m going crazy.

(Would you apply code formatting please to your console I/O? Edit your post, select the console text, click the code button in the toolbar).