-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use control docker containers via docker compose, inside the olivetin container #312
Comments
Heya @nickelswitte , very keen to help you out here, sorry that you found the documentation confusing. Docker is preinsalled in the container, but not for running containers inside containers, but so that you can send start/stop commands to thr docker sock. docker-compose is provided as a separate package inside Fedora (which OliveTin uses as the base container image), but this is docker-compose version 1. So I hope this clears up your understanding:-) if anything is unclear please just say. As an alternative, consider using ssh: https://docs.olivetin.app/action-ssh.html this requires a bit of setup, but it's generally less cumbersome to maintain. |
Hello James, Thank you a lot for the quick reply. Actually, I will don't understand it honestly. I have two questions:
Sorry for the inconvenience! |
@nickelswitte , actually the When you say that Just set There is a discord link on the OliveTin homepage (https://www.olivetin.app/) if chat is easier for you :-) |
Thank you very much for the support. The But I have another question. Do you think it is even possible to use docker compose through the docker sock, in a similar manner like the normal
should do the trick, but according to my tests it does not. I need access to the Or in other words: If I have a project that needs multiple containers (database, webserver, etc.) how would you control this with olivetin? Thanks a lot for the help! |
docker/docker-compose are basically only user interfaces to the docker service much in the same way the web ui is for OliveTin. You push the button on the website which sends a request to run a certain action, but it is executed by the backend. With docker it's the same: docker command="hey, I need a new container with these properties" and the backend (docker service) creates/runs it. So as long as you have access to docker.sock you should be able to do anything inside as you would outside.
Another option would be to create the container once via compose manually and then only control it via docker start/stop from OliveTin. Stop, unlike compose down, will not destroy a container so could be easily started again (with all the settings it was originally created). Not sure how many containers you want to control here and I might be missing some edge cases, but you should be able to achieve what you want with just docker start/stop ~95% of the time. |
Thank you very much for your thoughtful reply. This gives me some nice options to try.
I will close this thread, as there are enough options for me to solve this need. Thank you! |
What seems to be the problem?!
I run all my services on my host machine using docker compose. In one case, a minecraft server. I would like to give others safe access to start and stop this server. I use olivetin inside a docker container itself. Somehow I cannot currently figure out, how to control docker containers on my host machine, from within the olivetin container. Here are my steps:
It has not access to the docker compose file, as this one is on the host machine, and not in the olivetin container. But I am a bit confused. I run services like portainer, and am used to them controlling my other docker containers via the
/var/run/docker.sock
bind mount. However, when I follow the docs of olivetin, it rather seems like I am supposed to run docker within the olivetin container, and not on my host machine. Or I am not understanding something here.So I guess the question is: How can I control containers on my host machine with
docker compose
correctly?Can you provide a sosreport?
What package/file/container did you use to install OliveTin?
official latest tag, so I guess OliveTin-1234-x86_64.rpm
Your config.yaml
The text was updated successfully, but these errors were encountered: