3 ms·
Instead of recording the “docker run“ commands, you might want to have a look at docker-compose
by nodlija 5y ago
Instead of recording the “docker run“ commands, you might want to have a look at docker-compose
- mattbee 5y agoYes I thought that was odd too! OP mentions keeping manual records of "docker run" commands and that it might need some improvement... Well apart from that detail that's exactly what I do for my stack of personal sites. "docker-compose" is really hard to beat for all kinds for setups. And I get 64GB to play with for 50EUR/month from Hetzner, so I don't spend too much time worrying about RAM.
- jlkuester7 5y agoCame here to say this! Honestly, my into to docker-compose came when I realised I was starting to do the same thing (saving 'run' commands). Small learning curve for the yaml structure, but well worth it (and honestly I think it is easier to visualize the deployment when it is all nicely laid out in the compose file). Pretty much the only way I use docker now. (Also has a bonus of not really adding a bunch of overhead or complex. Just does what you need for a basic multi-container deploymnet and no more.)
- ytjohn 5y agoI had started out the same way, especially if it was a new app and I wasn't familiar with how I really wanted to run it. Some containers expect a fair number of environment variables and multiple mounts. Once I got everything working, I would create a script /svcs with the corresponding docker run command. There's even a cool tool called "runlike" which can create a well formatted command for any running container. https://github.com/lavie/runlike/ https://github.com/lavie/runlike/ But I've got those migrated to docker-compose files these days and I try to start with the docker-compose file instead of going directly into testing out docker run commands.