Closed andyneff closed 5 years ago
That is an outrageously clever idea! Thanks for sharing it. At a minimum, I'm going to add this to the advanced docs, but I think it could be incorporated into entrypoint.sh
(assuming the user gives the container SYS_MODULE
).
Of course, I'll credit you for the idea. Thanks again!
I found a trick you could optionally include in (maybe your more advanced?) documentation. There is a way to make a docker container run
modprobe
for youDockerfile
(image withmodprobe
in it)docker-compose.yml
Now you just make your nfs container server depend on that modprobe (maybe you'll have to add a wait routine instead of a check and fail on the lsmod check for nfs and nfsd?) and now you have a container that you can keep running through reboots.
You can of course combine these two into one container instead of two, but I don't know how universal this is (for example using a debian image on fedora, but I suspect that'll work)
Note for the
modprobe
, you only needSYS_MODULE
capabilityBase on https://dummdida.tumblr.com/post/117157045170/modprobe-in-a-docker-container
Thank for the awesome image!