I wanted to deploy a “racktables” container and I want to do it by myself. So I used the official ubuntu docker image and I installed Apache, MySQL and PHP and configured racktables. Everything is working fine.
Here is my problem :
I commit the container to save it as an image. Now I have the image and want to run it again. When I run docker run -d -p 8082:80 --name racktables racktables:latest
The container is initialized but keep restarting always and always.
And I don’t have any logs when I run docker logs 783bc0198e58
Like I undestand while reading million of forum and documentation my container doesn’t have anything to run at startup. But I don’t know what to do for solving this issue.
Engine information :
Docker version 18.06.0-ce, build 0ffa825 OS :
Linux 4.15.0-29-generic #31-Ubuntu
This racktables image that you try to start from, is that somehting you build yourself?
Because typicaly, you wont start it with /bin/bash (as i can see in your screenshot that it does, but i belive its default )
So, my guess is that you need to run the container, with a command, like:
docker run -d -p 8082:80 --name racktables racktables:latest /some/command/to/start/racktables
Create a MySQL container from a Dockerfile with settings that I want/need. Then create a Dockerfile from php+apache image with all commands needed to configure Racktables that I link to the MySQL container.
Using docker-compose
Create a stack that will create these two containers.
Sounds better with docker-compose.
I’ll give a try, if needed I’ll post again on this topic.
Pictures of text, are hard to read by blind people. It is in infringement of accessibility laws. (This image is hard to read by me (gray on black, small size)). Therefore post text as text.
Try running container with php and apache with software like mysql…THat should work.PS.:php has inbuilt php+apache image so it should work.If it doesnt then post some more details here…WIll be glad to help…Cheers.mykfcexperience