Skip to content

Instantly share code, notes, and snippets.

@funkyremi
Last active June 11, 2022 07:51
Show Gist options
  • Save funkyremi/0c2eaf12e4c50bb97f74afdfc5278001 to your computer and use it in GitHub Desktop.
Save funkyremi/0c2eaf12e4c50bb97f74afdfc5278001 to your computer and use it in GitHub Desktop.

Update all docker images

docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull

Remove all containers

docker container rm $(docker ps -aq)

Remove all images

docker rmi $(docker images -aq)

See Docker Daemon logs

  • Ubuntu (old using upstart ) - /var/log/upstart/docker.log
  • Ubuntu (new using systemd ) - sudo journalctl -fu docker.service
  • Amazon Linux AMI - /var/log/docker
  • Boot2Docker - /var/log/docker.log
  • Debian GNU/Linux - /var/log/daemon.log
  • CentOS - /var/log/daemon.log | grep docker
  • CoreOS - journalctl -u docker.service
  • Fedora - journalctl -u docker.service
  • Red Hat Enterprise Linux Server - /var/log/messages | grep docker
  • OpenSuSE - journalctl -u docker.service
  • OSX - ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/d‌​ocker.log
  • Windows - Get-EventLog -LogName Application -Source Docker -After (Get-Date).AddMinutes(-5) | Sort-Object Time, as mentioned here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment