Skip to content

Instantly share code, notes, and snippets.

@markhuyong
Last active February 28, 2019 11:43
Show Gist options
  • Save markhuyong/04f2f6239ed4e69d1054223cda56d222 to your computer and use it in GitHub Desktop.
Save markhuyong/04f2f6239ed4e69d1054223cda56d222 to your computer and use it in GitHub Desktop.
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

#!/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