https://rancher.com/ logo
Title
b

bulky-memory-85762

10/27/2022, 6:00 AM
Hello, I am not sure this is good place to ask about macos & docker but: I have macos and I use Ranched Desktop, Currently when I run docker compose up, my volume files became to be directory in container or does not copy to container. Do I have to change any system settings?
h

helpful-butcher-75556

10/27/2022, 10:37 AM
Mounting a volume with docker run or compose into a container does not copy data, just lets you access a local folder as a folder inside the container. https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only
b

bulky-memory-85762

10/27/2022, 10:52 AM
test-mock:
  build: test-mock
  volumes:
    - ./files:/opt/wiremock/__files
  ports:
    - 8090:8080
# ls -l __files/
total 0
still I cannot see any files.
h

helpful-butcher-75556

10/27/2022, 10:58 AM
left is local, right is the path in the container so
docker run -v /tmp:/container_tmp busybox ls /container_tmp
Maps /tmp on the local machine to /container_tmp inside the container. This probably should be posted on StackOverflow, etc since it's not RD-specific
am.. I am not sure it does not depends on Rancher Desktop
h

helpful-butcher-75556

10/27/2022, 11:30 AM
I'm on a Mac and mount volumes ok. Related to that ^^^ issue, I posted this earlier and didn't get any reply.
b

bulky-memory-85762

10/27/2022, 12:12 PM
yeah this is similar I guess so.