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”…

  • OmltCat@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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.

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Even for the one-liner argument - a better one liner than any docker run is docker compose up [-d].

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    it turns out GPT converts plain docker commands into docker compose files well enough to me, it’s been my go-to when I need to create a compose YAML. Checking a YAML and making one or two small corrections is even faster than entering all info in a form like Docker Compose Generator.

  • ilmagico@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    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.