Is there a way to access to raw disk device in Docker container on Mac?
I would like to mount ext4 filesystem in docker container and edit contents with linux(not mac) tools. I tried ex4fuse
but it stalls on write operation, reads always fine.
For ubuntu 18LTS running on a lenovo SE350, the following command worked like a charm for me:
docker run --rm -it --privileged --device=/dev/sda:/dev/sda gdisk:latest bash
I believe this did the magic
--privileged --device=/dev/sda:/dev/sda
In short, it doesn't seem that there is a straightforward and elegant way of using Docker to access an ext4 volume on a macOS host without using FUSE or full virtualisation.
This topic has been covered in further detail on the DevOps StackExchange
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