I am trying to run an nginx image inside a Docker container. I have tried these steps
- ssh inside ubuntu docker image
docker run -v /var/run/docker.sock:/var/run/docker.sock -it ubuntu:latest bash
- Installed Docker
- Run Nginx image
docker run -d -p 80:80 nginx
curl localhost:80
gives Connection refused