I am totally new on Docker and I want to set up a hello world project with Docker.
Currently, I'm using Apache on port 80 as a web server and I don't want to kill PID.
Here is my Dockerfile :
FROM php:7.2-cli
COPY src/ /usr/src/myapp
EXPOSE 80
after I run docker build -t hello-world .
, simply run docker run -p 80:80 hello-world
and found that the port in USED, so I changed the port to : docker run -p 8080:80 hello-world
and I got Interactive shell
.
so after research on google, I was able to run the server with this command :
docker container run --publish 8080:80 nginx
Here is the question: How can I run the hello world app with 8080 port on my local computer?