You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to set up a little tool-container with tools from cmd.cat to not having to install them on my host machine. But since I want to install and update them with docker-compose and keep the container running I set up my docker-compose file like this:
the command: docker-compose pull tools && docker-compose up -d
runs through smooth, but then the container keeps on restarting and ends up in a restart loop:
docker exec -it tools /bin/bash
Error response from daemon: Container 4b4af273627611a793715af4c96d43xxxxxxxxxxxxxxxxxxxxxxxxx is restarting, wait until the container is running
Is there any good way, to run these cmd.cat tools in a persistent container so I don't have to start them with docker run -it everytime I want to use them?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
the-hotmann
changed the title
How to start "tool" container with docker-compose?
How to start persistent "tool" container with docker-compose?
May 20, 2022
Found a workaround, so the container stays active and idles so you always have a ready container which you can access with:
docker exec -it tools /bin/bash
The workaround is, using the -d (detatched) parameter to start it, like this:
docker run --name tools -d -it cmd.cat/curl/wget
That gives the container the name tools and starts him in the background, so he does not terminate if you are not active in his terminal.
Sadly this is not a docker-compose way, but the old traditional docker way of starting things. Would be thankful for any hint how to do it with docker-compose, tried it already but nothing worked.
The container has to be interactive, so -it has to be used when running docker run, same for docker-compose. The default command is always shell, so no need to change this one.
I tried to set up a little tool-container with tools from cmd.cat to not having to install them on my host machine. But since I want to install and update them with docker-compose and keep the container running I set up my docker-compose file like this:
the command:
docker-compose pull tools && docker-compose up -d
runs through smooth, but then the container keeps on restarting and ends up in a restart loop:
Is there any good way, to run these cmd.cat tools in a persistent container so I don't have to start them with
docker run -it
everytime I want to use them?Thanks in advance!
The text was updated successfully, but these errors were encountered: