Reputation: 8211
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.
Upvotes: 4
Views: 2757
Reputation: 2175
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
Upvotes: 1
Reputation: 658
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
Upvotes: 1