docker-library/docs

php:7.1,0,2 container stops

stiko opened this issue · 1 comments

stiko commented

any container I try to run, exits right away.
$docker run php:7.1
When I look at
$docker ps -a
Status: Exited (0) 2 seconds ago
Try to start it again
$docker container start <container_id>
Same status

I have tried php 7.2, 7.1, and 7.0
Oh, and when look at the log
$docker container logs <container_id>
I get
Interactive shell

This is the docs repo, there is a specific repo for the php image. However these repos are used for addressing issues with the images and not as a user help forum, you would find such resources at the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

When you run an image there is a single process run, if it exits then the container exits as there is nothing running. Some images don't run anything by default, in such instances you can docker run them with the -i flag to emulate an interactive shell which will run as a process in the container.