When using pipework to map physical network devices into the network namespace of docker containers you will encounter the following problem. Each time the docker container is restarted the mapped network device will not be available anymore inside the container (it will be part of the default network namespace again).
The reapply-pipework
script is supposed to run periodically on a docker host.
It reapplies network settings to docker containers using pipework.
- Install the pipework script to
/usr/local/sbin/
: cd /usr/local/sbin/
sudo wget https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework
sudo chmod a+x pipework
- Install the reapply-pipework script:
- Clone this git repository (e.g.
$ git clone https://github.com/zaunerc/reapply-pipework.git
) - Install the reapply-pipework script by using the provided install script. This installs the reapply-pipework script to
/usr/local/sbin/
. - Configure the reapply-pipework script using the
/usr/local/etc/reapply-pipework.conf
file.