How to publish ports in docker files
问题 I need to map the ports on the host to the ports on the container. I can achieve this by running the "docker run" command with the -p option. How do I achieve this through the Dockerfile ? Using the following gives a "deprecated error" EXPOSE 80:8080 How else can I make the exposed ports public through teh dockerfile? 回答1: You can't. What ports are published on the docker host is strictly a decision that should be made by the local administrator, not by the image they are trying to run; this