dockerfilesystemsxfs

Docker use different filesystems in a container


How can I use different filesystems in a container? I have tried to make an img with XFS filesystem.

mkfs.xfs proba.img

It was succesful, but when tried to mount it, get following error. Already tried to use chmod, but same error.

mount: block device /root/proba.img is write-protected, mounting read-only
mount: cannot mount block device /root/proba.img read-only

xfs_info's output: proba.img is not a mounted XFS filesystem

Is XFS(or another) filesystem usage possible in a single conatiner?


Solution

  • As per this question too, it's not possible to mount a filesystem inside a container.

    You'll have to mount the new image in the Docker host and expose it to the container as a volume. See question above for examples.