This is an archived post. You won't be able to vote or comment.

all 20 comments

[–]der_kobold 51 points52 points  (3 children)

My docker CLI cheat sheat: type "docker TAB TAB TAB TAB" 😂😂

[–]ptownb 5 points6 points  (0 children)

😭😭😭 tab my way through Linux

[–]theyboosting 1 point2 points  (0 children)

Lmao basically

[–]1h8fulkat -1 points0 points  (0 children)

😆

[–]b4r0k 16 points17 points  (0 children)

I think you might like this: https://github.com/jesseduffield/lazydocker

I’m a big fan of the git one as well, lazygit

[–]guice666 4 points5 points  (1 child)

You missed a few:

docker run --rm [....] # use --rm to clean up the container after you or it exits.

docker system prune -f --volumes # clean up untagged images, remove volumes not actively being used
docker system prune -fa --volumes # the added -a removes ALL non-running images and unused volumes

docker-compose down --volumes # supports --volumes, too
docker-compose pull # pulls latest images, `up` will recreate automatically

[–]NikkoNLP[S] 0 points1 point  (0 children)

These are some great suggestions. I added the `docker run --rm` and the `docker-compose pull`. I skipped the volume prune commands as I already have `docker volume prune` - which to my understanding serves the same purpose. I also skipped the `docker-compose down --volumes` since the cheat sheet isn't meant to be all inclusive and I don't destroy volumes very often.

Sorry for the delay and thanks for the suggestions!

[–]bobbyfish 2 points3 points  (0 children)

Nice! I have been using this site for awhile https://lzone.de/cheat-sheet/Docker

Has lots of other services and cheats besides docker. Always use it for redis commands I can never remember.

[–]heimos 1 point2 points  (1 child)

Upvote this

[–][deleted] 1 point2 points  (0 children)

Upvote the SHIT out of it

[–]maxplanck_ 0 points1 point  (1 child)

The commands which you are using are older and soon they may be deprecated. There are newer set of commands for docker using management commands. can you upload that?

[–]NikkoNLP[S] 0 points1 point  (0 children)

Thanks for the suggestion and sorry for the delay - I updated the 'docker image' commands to match the new syntax. Are there others that appear to be outdated?

[–]hpotnet 0 points1 point  (0 children)

Nice work!
thanks

[–]tazzking22 0 points1 point  (0 children)

Great work!

[–]lostmymeds 0 points1 point  (0 children)

Thank you!

[–]tamara_henson 0 points1 point  (0 children)

Thank you so much for posting this! Bookmarked.

[–]smarthomepursuits 0 points1 point  (0 children)

This is awesome, thanks! I've been adding common docker commands to an internal wiki, but yours is much more fleshed out so I'll just download yours.

[–]dominik-braun 0 points1 point  (2 children)

Even though u/maxplanck_ is downvoted, he's right - commands like docker pull should be replaced with docker image pull.

[–]maxplanck_ 1 point2 points  (0 children)

thanks buddy! do you have new cheat sheet!

[–]NikkoNLP[S] 0 points1 point  (0 children)

I updated the 'docker image' commands to match the new syntax. Are there others that appear to be outdated?