Docker Community Forums

Share and learn in the Docker community.

Docker build using a local repo on host?


(Frank) #1

What I want to to is build a simple me container running centos7 but the VM/container has no internet access so I have a local repo that I can mount on the VM via NFS. Now when I want to do a yum update or yum install in the Dockerfile how do I refer to the VM’s local filesystem? Looking here I’m not sure i can: https://docs.docker.com/engine/userguide/containers/dockervolumes/

Sure I can do it during a docker run but I want to install packages during the build process. I can update the CentOS-Base.repo and copy that to the container but how do I NFS/mount the repo in the container for the building process?