Skip to content

Instantly share code, notes, and snippets.

@BasPH
Last active December 1, 2017 09:55
Show Gist options
  • Save BasPH/2549816c93cfe0710daea59986cd0b24 to your computer and use it in GitHub Desktop.
Save BasPH/2549816c93cfe0710daea59986cd0b24 to your computer and use it in GitHub Desktop.
docker-ssh() {
docker exec -i -t $1 sh
}
docker-update-time() {
docker run --rm --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n ntpd -d -q -n -p `cat /etc/ntp.conf | awk '{ print $2 }'`
}
docker-cleanup-volumes() {
docker volume rm `docker volume ls -q -f dangling=true`
}
docker-cleanup-images() {
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment