curl -OL https://gist.githubusercontent.com/markhuyong/04f2f6239ed4e69d1054223cda56d222/raw/41547b490bf89daa0e478f41550beb4dcf069b32/active-docker-insecure-registry.sh
chmod +x active-docker-insecure-registry.sh && sh active-docker-insecure-registry.sh
Last active
February 28, 2019 11:43
-
-
Save markhuyong/04f2f6239ed4e69d1054223cda56d222 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
uri=$1 | |
echo $uri | |
echo -e "[Service]\nExecStart=\nExecStart=/usr/bin/dockerd -H fd:// --insecure-registry $uri" | sudo SYSTEMD_EDITOR=tee systemctl edit docker | |
sudo systemctl daemon-reload || failed "failed to reload docker" | |
sudo systemctl restart docker || failed "failed to restart docker" | |
sudo systemctl status docker || failed "failed to status docker" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment