I have following in Dockerfile for a spring boot project:
EXPOSE 8081
Does it mean that container would deploy the application on its port 8081?
And then in docker run command, I need to do:
docker run -p 8080:8081 -t imagename
So that URL http://localhost:8080 would map to container's 8081 port where application is deployed, and hence is accessible.
/etc/hosts/file?