Docker container exits immediately after start without any errors

Solved
bitmap

Oct 2nd, 2020 05:12 PM

Hello,

When I start a Docker container it exits immediately, and if I check the logs with:

docker logs -f container_id

There are no errors.

I start the container in the standard way:

 docker run -d --name php my_php_image

Any ideas?

bobbyiliev

Oct 2nd, 2020 05:14 PM

Best Answer

Hello,

I've seen this in the past as well, a quick solution for me is to start the containers with the following command instead:

docker run -dit --name php your_image

Hope that this helps!

Report
1