First post, brand new to docker and portainer. Im running portainer inside openmediavault on a raspberry pi. Ive been messing with wordpress and the listed stack doesnt install mysql, presumably due to ARM arch. So, I grabbed a wordpress php apache image, created a container with it, logged into docker “console” and installed mysql in the wordpress image. Configured db and docker commit to new image.
When the container is started, mysql doesnt start. I quickly log into the docker image, “service mysql start” and im up and running. Id obviously like mysql service to start on container start.
I added a service mysql start to the container command section in portainer. Didnt come up and the container immediately stops. Added /usr/sbin/mysqld -u mysql to command and mysql did start! However, apache did not. Seems I overwrote the existing command of apache2-foreground.
Ive read that you typically dont want to start multiple services inside a container. However, i dont see a violation with what im trying to pull off in a single container.
How do I add an additional service start CMD to the existing image/container?
If via start script, please detail this for a newb (file locations…etc). I can figure it out with standard docker commands, but running from portainer is confusing the heck out of me, without a solid understanding of how docker works without portainer.
Could someone point me in the right direction? Doesnt seem like it should be THIS difficult.
Thanks in advance.
Note: this is on an internal LAN with trusted users, not exposed to DMZ. Definitely would like to play with it and lock down as tight as possible, but for now just trying to get mysql to auto start.