Skip to content

Instantly share code, notes, and snippets.

@chipulaja
Last active September 29, 2021 15:30
Show Gist options
  • Save chipulaja/2a7dc491edd4d855da90b04a61135b8b to your computer and use it in GitHub Desktop.
Save chipulaja/2a7dc491edd4d855da90b04a61135b8b to your computer and use it in GitHub Desktop.
catatan seputar docker

how to disable auto start container

docker update --restart=no my-container

how to remove none image docker

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

how to run docker container with another user (not root)

docker exec -itu user-name container-name bash

how to test connection

docker run -it --rm busybox ping www.google.com

how to remove container by image name

docker rm $(docker ps -a -q --filter ancestor=chipulaja/contohimage:0.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment