Skip to content

Instantly share code, notes, and snippets.

@freddi301
Last active June 28, 2016 18:23
Show Gist options
  • Save freddi301/4ce9dcd65ef4fecfb5be132d8b26d2f4 to your computer and use it in GitHub Desktop.
Save freddi301/4ce9dcd65ef4fecfb5be132d8b26d2f4 to your computer and use it in GitHub Desktop.
Docker Utils Scripts
#!/bin/sh
mkdir -p /etc/systemd/system/docker.service.d
echo "[Service]
Environment=\"HTTP_PROXY=http://10.215.2.2:8080/\"
Environment=\"HTTPS_PROXY=https://10.215.2.2:8080/\""\
> /etc/systemd/system/docker.service.d/http-proxy.conf
echo sudo systemctl daemon-reload
sudo systemctl daemon-reload
systemctl show --property=Environment docker
echo sudo systemctl restart docker
sudo systemctl restart docker
echo reset here
echo /etc/systemd/system/docker.service.d/http-proxy.conf
exit 0
#!/bin/sh
mkdir -p /etc/systemd/system/docker.service.d
echo "" > /etc/systemd/system/docker.service.d/http-proxy.conf
echo sudo systemctl daemon-reload
sudo systemctl daemon-reload
systemctl show --property=Environment docker
echo sudo systemctl restart docker
sudo systemctl restart docker
echo reset here
echo /etc/systemd/system/docker.service.d/http-proxy.conf
exit 0
docker rmi $(docker images -f "dangling=true" -q)
docker images --filter "dangling=false" --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment