This is a simple web server based on Flask. This version of code is specific to Ubuntu OS.
docker build -t phpapp:latest .
docker image ls
docker container run -p 8000:80 --name myphpapp --rm phpapp:latest
docker container run -dit -p 8000:80 --name myphpapp --rm phpapp:latest
docker container exec -it myphpapp bash
docker container exec -it myphpapp php -f /var/www/html/index.php
Attach to the container but you can not do much here. Press Ctl+p Ctl+q to come out without stopping the container
docker attach myphpapp
docker logs myphpapp
curl http://localhost:8000