docker run -v /Users/xx/var/temp:/ -it alpine bash
But it tips:
invalid mount config for type bind: invalid specification: destination can't be /
Why the alpine host directory could not mount?
Docker won't permit you to bind a host directory or volume to root (/) inside a container. You'll need to bind it at a subdirectory, e.g:
docker run -v /Users/xx/var/temp:/var/temp -it alpine bash
This would make the directory available at /var/temp inside the container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With