Docker Community Forums

Share and learn in the Docker community.

What's the best way to mount NFS share in Dockerfile?


(Langtusj) #1

Hi,

I need to get an artifact from NFS share to complete the installation. There’s no other way except mounting it using NFS and copy the installer. I know we can do that --privilege when doing “docker run” but there’s no similar option with “docker build”. I saw some other thread asking for features like “docker runp” but I don’t think it’s ever implemented. So my question is if there’s any way to do that in Dockerfile?

Thanks

Stanley


(Sven Dowideit) #2

No, there isn’t. I think the main way to do it would be to mount the NFS share onto the box you’re running docker build from, and building from it.

if you have a Dockerfile in the same NFS dir, you could build that directly.