1
I'm new to DockerFile.
I want Nginx to be listening on port 8080
. so I've written the dockerFile in this way:
FROM nginx:1.11-alpine
COPY index.html /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g" , "daemon off;"]
but after making image and running container with this command:
docker run -d -p 80:8080 nginxt:v3
and Curl on localhost I'm getting this error :
curl: (56) Recv failure: Connection reset by peer
what am I doing wrong? EXPOSE 8080 doesn't mean that Nginx must be listened on 8080?