https://rancher.com/ logo
Title
b

big-sugar-91946

04/20/2023, 7:54 PM
hello all: apologies if this seems odd, but I am just a lowly network guy. I am looking for pointers to resources and advice: I have a group of tools for my team of network engineers built and distributed as a docker container they run with rancher-desktop (1.8.1) with some CLI tools in the container that get cloned into the container by a shell script. the point has come that i need to solve some performance problems with the database the tools use by moving to a network DB that we can read and write in parallel threads (current is a sqlite db). so i am working to build and launch a DB container that the App container would connect to for its DB. Up to this point, we have been using Docker not containerd and have kubernetes disabled in rancher-desktop config. As i understand it, i can accomplish the goal, but i need to use k3s in rancher-desktop to run multiple containers? and either a docker-compose or nerdctl-compose file to configure and launch both containers together? Is there a way to at boot launch both containers together and get it to just start up on laptop boot? how might this bee accomplished?
w

wide-mechanic-33041

04/20/2023, 8:07 PM
well to do a multi container app you could do a compose based app or you could do full kubernetes. you don’t need all of kubernetes if you are using compose.
if you don’t need all the k8s stuff I say stick with compose to start.
then its just a simple “depends_on: db” param so the app starts up after the db
b

big-sugar-91946

04/20/2023, 8:09 PM
can a compose setup be booted at startup ? or would it require a command the engineers run to start it up
[docker|nerdctl] compose up
w

wide-mechanic-33041

04/20/2023, 8:09 PM
now starting when the laptop starts gets sticky as you need ot start the container hosting stuff as well (Rancher Desktop in this case) so timing would be a mess
you could do some sort of scheduled task to check if docker is up and then run the compose up command in the background
b

big-sugar-91946

04/20/2023, 8:12 PM
so you would recommend just compose route for now, avoid kubernetes ? my experience with kubernetes is limited (primarily, i have interacted with k8s as a large thing to allocate address blocks for)
w

wide-mechanic-33041

04/20/2023, 8:13 PM
if you don’t need all that k8s brings and given you are single node it adds a lot of domain knowledge that doesn’t sound like you need
if a simple 2 container compose works keep life simple
b

big-sugar-91946

04/20/2023, 8:14 PM
ok, will try this compose route. any pointers to resources on writing a compose file, like a tutorial?
w

wide-mechanic-33041

04/20/2023, 8:14 PM
b

big-sugar-91946

04/20/2023, 8:15 PM
hmm.. blocked at work.
w

wide-mechanic-33041

04/20/2023, 8:15 PM
hah well don’t look at archive.is or 12ft.io as ways to handle that.
b

big-sugar-91946

04/20/2023, 8:16 PM
thank you'
appreciate the advice
w

wide-mechanic-33041

04/20/2023, 8:17 PM
and lots of exmaple app+db on github as well.
but if they are blocking docs.docker.com make sure that even these basics are cool with your org. shouldn’t be anything threatening on that site so bit odd that it would be blocked
b

big-sugar-91946

04/20/2023, 8:20 PM
it is a forcing function i am sure.. forcing the <large> population of users to conform to the corp direction set to use rancher-desktop and block access to docker registry
w

wide-mechanic-33041

04/20/2023, 8:25 PM
well docker and docker desktop are not an equivalent. lots of helpful data in their docs site for folks given they authored most of the implementations before they went into OSS stewardship. tons of examples out there on github and other vendor agnostic systems to get you going on compose. and there is the primary upstream as well https://github.com/compose-spec
b

big-sugar-91946

04/20/2023, 8:26 PM
thank you, i really appreciate it
👍 1