When I call the docker run
command in my terminal. The server starts up fine and is accessible, but when I try to add the port in the dockerfile. It does not work.
Is there a way I can set the port in the dockerfile explicitly? Thanks for any help.
This works:
docker run -d -p 5555:4444 -v /dv/sm:/dv/sm sa:latest
I remove the -p flag and try to "pass" it in via the docker file, but it does not work (error: This site can’t be reached)
Not working:
docker run -d -v /dv/sm:/dv/sm sa:latest
I've tried - Docker file:
FROM WorkingTestImage as MyImage
ENTRYPOINT "/opt/bin/entry_point.sh"
CMD ["-p","5555:4444"]
FROM WorkingTestImage as MyImage
ENTRYPOINT ["/opt/bin/entry_point.sh","-p","5555:4444"]
CMD ["-p","5555:4444"]
FROM WorkingTestImage as MyImage
ENTRYPOINT ["/opt/bin/entry_point.sh","-p","5555:4444"]