Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker run php : Interactive shell

Tags:

php

docker

I am running the command

docker run php

and the terminal shows 'Interactive shell' and the docker image exits automatically. Here is the docker status

docker ps -a
"docker-php-entrypoi…"   Less than a second ago   Exited (0) 3 seconds ago 
like image 242
Star.Kid Avatar asked Jul 24 '26 13:07

Star.Kid


1 Answers

Please try the following:

docker run -it --rm php bash
like image 142
Chun-Yen Wang Avatar answered Jul 27 '26 01:07

Chun-Yen Wang