5 ms·
Docker.how – Docker command cheat sheet
- anagogistis 9mo agoI wanted a Docker cheat sheet that's actually nice and accessible from anywhere. So I built one with help from Claude Code and shipped it in ~1 hour. Feedback is welcome.
- yogirk1 9mo agoLooks pleasant.
- crtasm 9mo agoDid you test all the examples to confirm they work as expected and none of the attributes are obsolete?
- anagogistis 9mo agoMost of them, yes. But I haven’t exhaustively validated every single flag/example. If you spot anything outdated or wrong I'd appreciate it and happily fix it.
- crtasm 9mo agothe version line in first compose example stood out to me, I didn't look at the other pages
- tomhow 9mo agoThanks for submitting this. We're happy for anything to be submitted that the community finds useful. But “I built one with help from Claude Code and shipped it in ~1 hour” doesn't really clear the bar for a good Show HN. It's not really “something you've made that other people can play with”; it's more of a list of commands, and lists are explicitly outside the scope of Show HNs. For that reason we've removed the “Show HN” prefix. https://news.ycombinator.com/showhn.html https://news.ycombinator.com/showhn.html
- ZpJuUuNaQ5 9mo agoWhat bothers me the most about LLM-generated CSS is the inclusion of these long and completely unnecessary transitions. Every single time, it's the transform on hover and opacity+transform on page load. Why? I haven't noticed these patterns that often on popular sites, but for AI-generated UIs this seems to be the default. If you hover on elements and switch pages frequently, these animations become annoying really quickly.
- anagogistis 9mo agoI personally like subtle transitions (it feels modern to me), and they're cheap performance-wise, but I get that it can be annoying for some people. I'll consider changing it. Thanks for the feedback.
- DJBunnies 9mo agoDo folks not leverage built in help commands anymore? I must be getting old.
- koolba 9mo agoJust wait till these whippersnappers find out about man page.
- internet2000 9mo ago"Hey Claude, can you list the docker containers I have running, find the one using the uv:debian-slim image, and copy main.py from the app folder in it onto my pwd" ← No cheat sheet needed.
- K0IN 9mo agoSome people actually want to know and learn the things they use daily
- otterley 9mo agoYou can find the Docker documentation at https://docs.docker.com https://docs.docker.com.
- lifetimerubyist 9mo agoSome people don’t want to spend $30 per month to not learn things.
- DJBunnies 9mo agoThanks, I hate it.
- mmh0000 9mo agoI am so not understanding the purpose of this... If you need Docker CLI commands, isn't it just easier to use the CLI that you're already on? Docker is fully self-documented: / # docker Usage: docker [OPTIONS] COMMAND A self-sufficient runtime for containers Common Commands: run Create and run a new container from an image exec Execute a command in a running container …SNIP… / # docker run --help Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] Create and run a new container from an image Aliases: docker container run, docker run Options: --add-host list Add a custom host-to-IP mapping (host:IP) …SNIP…
- fragmede 9mo agoAre you on a desert island with no access to the Internet? If you don't know docker, what's faster? Reading all of the documentation first and then figuring out the difference between, say, run and exec, or just copy and pasting a command from a tutorial until it sinks in and you gain a better understanding? This is the AI information age. If docker has eaten your hard drive, and again, you don't know docker, is it easier to have ChatGPT tell you, or muddle around with ps, rm, images, rmi and all of the various options. If you have a command with a bunch of flags, static documentation like man pages are just such a poor interface compared to eg explainshell.com. This opinion obviously gets me thrown out of the Unix grey beards club, but I don't have a beard and it's not grey.
- rendaw 9mo agoHow do you know which command to copy and paste? Unless you're suggesting to just try them randomly until you get one that seems to do what you want. There are plenty of commands where the documentation is nearly impenetrable (e.g. ffmpeg, or if it exists at all), but I think GP's point was that for docker it's fairly simple. IMO except for the concrete examples for docker run/exec, this website looks more or less exactly like the CLI help output for docker.
- allarm 9mo ago> what's faster? What a terrible question. Why do you think speed is a good metric? Why is it better to copy-paste in 2 seconds than to read the manual for 20 minutes and learn the basics? What would have happened?
- vivzkestrel 9mo agono docker swarm commands?
- amstan 9mo agoI keep hearing podman is better, especially for local setups. Does anyone know any podman cheatsheets similar to this or is it pretty much s/docker/podman?
- GCUMstlyHarmls 9mo agoI've used podman for number of years, possibly too long to really give a good comparison but for the most part it is exactly s/docker/podman. Can't think of anything I've read on the internet that I couldn't just copy the tail of and stick podman in front of it. Any run/build/inspect/volumes/secrets/etc all work like for like by design afaik. There may be additional flags on podmans end for other things it supports (eg: selinux labels). EDIT: Actually the biggest might be that containers often need a fully qualified name, so instead of `run name/container:latest` you need `run docker.io/name/container:latest`. You can configure default search domains though. The biggest thing people will (did?) miss is docker-compose. There was a third party `podman-compose` but now it seems that's actually been folded under the official umbrella, along with a `podman compose` command that will "Run compose workloads via an external provider such as docker-compose or podman-compose" so even that gap might be closed up now. Honestly I swapped to just scripting it myself when I swapped to podman - before even the third party podman compose existed, either using sh, .kube files or now systemd units. If you're used to using big 5-10+ container compose files you might have some friction there, might not. There are differences internally, ex: docker primarily runs as root and has a different networking stack compared to podman, but for most usage on a dev machine it doesn't matter, and matters maybe in a deployment, maybe not. Unsolicited opinion, I originally found Podman much less intrusive, dockers iptable muckery always rubbed me the wrong way, so it defaulting to userspace and just letting me do any nftable routing I wanted felt much nicer. It also just fees less icky when using it where its default or configuration options were less funnel-you-into-docker.com. https://github.com/containers/podman-compose https://github.com/containers/podman-compose