Last active
June 28, 2016 18:23
-
-
Save freddi301/4ce9dcd65ef4fecfb5be132d8b26d2f4 to your computer and use it in GitHub Desktop.
Docker Utils Scripts
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/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 |
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/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 |
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
docker rmi $(docker images -f "dangling=true" -q) |
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
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