For the vast majority of docker images, the documentation only mention a super long and hard to understand “docker run” one liner.
Why nobody is placing an example docker-compose.yml in their documentation? It’s so tidy and easy to understand, also much easier to run in the future, just set and forget.
If every image had an yml to just copy, I could get it running in a few seconds, instead I have to decode the line to become an yml
I want to know if it’s just me that I’m out of touch and should use “docker run” or it’s just that an “one liner” looks much tidier in the docs. Like to say “hey just copy and paste this line to run the container. You don’t understand what it does? Who cares”
The worst are the ones that are piping directly from curl to “sudo bash”…
Because it’s “quick start”. Least effort to get a taste of it. For actual deployment I would use compose as well.
Many project also have a example docker-compose.yml in the repository if you dig not so deep into it
There is https://www.composerize.com to convert run command to compose. Works ~80% of the time.
I honestly don’t understand why anyone would make “curl and bash” the officially installation method these days, with docker around. Unless this is the ONLY thing you install on the system, so many things can go wrong.
Out of curiosity, is there much overhead to using docker than installing via curl and bash? I’m guessing there’s some redundant layers that docker uses?
Of course, but the amount of overhead completely depends per container. The reason I am willing to accept the -in my experience- very small amount of overhead I typically get is that the repeatability is amazing with docker.
My first server was unRAID (freebsd, not Linux), I setup proxmox (debian with a webui) later. I took my unRAID server down for maintenance but wanted a certain service to stay up. So I copied a backup from unRAID to another server and had the service running in minutes. If it was a package, there is no guarantee that it would have been built for both OSes, both builds were the same version, or they used the same libraries.
My favorite way to extend the above is Docker Compose. I create a folder with a docker-compose.yml
file and I can keep EVERYTHING for that service in a single folder. unRAID doesn’t use Docker Compose in its webui. So, I try to stick to keeping things in Proxmox for ease of transfer and stuff.
Makes sense! I have a bunch of services (plex, radarr, sonarr, gluetun, etc) on my media server on Armbian running as docker containers. The ease of management is just something else! My HC2 doesn’t seem to break a sweat running about a dozen containers, so the overhead can’t be too bad.
you don’t have to decode anything… just throw it in here :
I used docker run when I first started, I think it’s a fairly easy entry point that “just works”.
However I would never really go back to it, since compose is a lot tighter and offers a better sense of overview and control
Plain docker is useful when running some simple containers, or even one-off things. A lot of people thing about containers as long running services, but there’s also many containers that are for running essentially a single command to completion and then shuts down.
There’s also alternate ways to handle containers, for example Podman is typically used with systemd services as unlike Docker it doesn’t work through a persistent daemon, so the configuration goes to a service.
I typically skip the docker-compose for simple containers, and turn to compose for either containers with loads of arguments or multi-container things.
Also switching between Docker and Podman depending on the machine and needs.
I don’t think you’re out of touch, just use docker compose. It’s not that hard to conver the docker run
example command line into a neat docker-compose.yml
, if they don’t already provide one for you. So much better than just running containers manually.
Also, you should always understand what any command or docker compose file does before you run it! And don’t blindly curl | bash
either, download the bash script and look at it first.
Nah I’ll just copy paste half the tutorial in one go and then blame others when things break