Creating own Image from Dockerfile wont work
Closed this issue · 3 comments
Ujkugri commented
Hi,
I build your Dockerfile with the command
docker build --rm --no-cache -t nfs-server /location/of/Dockerfile
and after that I tried
docker run -it \
-v /tmp:/var/nfs \
-v /root/docker-nfs-server/exports.txt:/etc/exports:ro \
-v /lib/modules:/lib/modules:ro \
--cap-add SYS_MODULE \
--cap-add SYS_ADMIN \
-p 2049:2049 -p 2049:2049/udp \
-p 111:111 -p 111:111/udp \
-p 32765:32765 -p 32765:32765/udp \
-p 32767:32767 -p 32767:32767/udp \
nfs-server
But it gets me this error:
==================================================================
SETTING UP ...
==================================================================
---->
----> ERROR: missing CAP_SYS_ADMIN. be sure to run this image with --cap-add SYS_ADMIN or --privileged
---->
Is there something I am missing when building your Image? Because if I use your Image, in other Words the Image erichough/nfs-server everything works fine. Problem is, that I need to modify the Dockerfile, so I cant just use your image ....
Hope you can help me
xZero707 commented
@GentianRrafshi I have submitted the pull request (#67) that fixes this. If you want it working in meanwhile, you can check out my fork xZero707/docker-nfs-server
Ujkugri commented
That worked. In my point of view, after the pull this issue can be closed.
xZero707 commented
Glad that this worked for you. I think the issue should remain open until my pull request is merged.