Skip to content

Instantly share code, notes, and snippets.

@kazuhisya
Created December 1, 2016 07:29
Show Gist options
  • Save kazuhisya/ffcfc91a8a5661f566bbda0d38897905 to your computer and use it in GitHub Desktop.
Save kazuhisya/ffcfc91a8a5661f566bbda0d38897905 to your computer and use it in GitHub Desktop.
docker tools
#!/bin/sh
docker rm $(docker ps -qa)
docker rmi $(docker images -f "dangling=true" -q)
#!/bin/sh
docker rmi $(docker images -f "dangling=true" -q)
#!/bin/sh
CONTAINERS=("docker.io/alpine:latest"
"docker.io/centos:5"
"docker.io/centos:6"
"docker.io/centos:7"
"docker.io/fedora:25"
"registry.access.redhat.com/rhel7:latest")
for CONTAINER in ${CONTAINERS[@]}; do
docker pull ${CONTAINER}
done
docker rmi $(docker images -f "dangling=true" -q)
#!/bin/sh
docker rm $(docker ps -qa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment