Last active
March 29, 2016 12:25
-
-
Save kadel/a9ef34063d14273171f8 to your computer and use it in GitHub Desktop.
Vagrantfile - add registry mirror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.vm.provision "shell", inline: <<-SHELL | |
| if ! grep -q 'registry-mirror' /etc/sysconfig/docker; then | |
| sed -i "s/^OPTIONS=\\"/OPTIONS=\\"--registry-mirror=http:\\/\\/10.1.2.1:5000 /g" /etc/sysconfig/docker | |
| sed -i "s/^\\# INSECURE_REGISTRY='.*/INSECURE_REGISTRY=\\"--insecure-registry=10.1.2.1:5000\\" /g" /etc/sysconfig/docker | |
| echo "restarting docker" | |
| systemctl restart docker | |
| fi | |
| SHELL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment