docs: Noted SELinux scenario for volume host directory mount

#390
This commit is contained in:
Geoff Bourne 2021-10-23 10:20:19 -05:00
parent 2e8f27a8ef
commit c8df2d8e31

View file

@ -223,6 +223,8 @@ services:
- ./minecraft-data:/data
```
> NOTE: if you have SELinux enabled, then you might need to add `:Z` to the end of volume mount specifications, [as described here](https://prefetch.net/blog/2017/09/30/using-docker-volumes-on-selinux-enabled-servers/).
### Converting anonymous `/data` volume to named volume
If you had used the commands in the first section, without the `-v` volume attachment, then an anonymous data volume was created by Docker. You can later bring over that content to a named or host attached volume using the following procedure.