I am working on a project where I have to create costum docker containers with costum volumes etc.
As I have to use some driver_opts
, I am wondering, what the flags
type: XXX
o: XXX
device: XXX
in a docker-compose file actually mean. I see all the people using them, but the docker manuals and all the resources I found so far couldn’t provide satisfying answers. I cannot even find a simple list of what arguments you could pass to all theses flags.
thanks in advance!
2
Answers
From
man mount
:To summarize:
is (more or less*) equivalent to:
mount -t AAA -o BBB CCC <docker_generated_mountpoint>
* – there is some parsing https://github.com/moby/moby/blob/8d193d81af9cbbe800475d4bb8c529d67a6d8f14/volume/local/local_unix.go#L122
This depends on the particular driver you are using.
man mount.cifs
differs fromman mount.nfs
, etc.From docker-compose driver_opts:
In fact, these opts should exactly same with the one when you use
docker run
, see Driver-specific options:You should in that official document find other opts for other kinds of driver like
tmpfs
,btrfs
etc.tmpfs:
btrfs:
So, these options is really different depends on the driver type you choose.