You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 you
Dockerfile (image with modprobe in it)
FROM fedora:29
SHELL ["/usr/bin/env", "bash", "-euxvc"]
RUN dnf install -y kmod; \
rm -rf /var/cache/yum/*
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 need SYS_MODULE capability
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!
The text was updated successfully, but these errors were encountered: