This is my Docker file looks like for tomcat image
ENV env dev
ENV name chetan
CMD [“catalina.sh”, “run”]
The problem I’m facing is that port 8080 that is defined inside my Dockerfile is cannot able to map with my localhost machine can anyone please tell my EXPOSE 8080:8080 ? is correct or not?
I have to write this everytime
docker run -itd -p 8080:8080 my_tomat_image
I want that port 8080 that is defined inside my docker file is mapped with my localhost automatically I don’t need to define -p 8080:8080 when I run the docker image using docker run command