DockerでhostOSが利用するport固定するやつ
DockerでhostOSが利用するport固定するやつ、
v0.6.3から使える
http://docs.docker.io/en/latest/use/port_redirection/
# Bind TCP port 8080 of the container to TCP port 80 on all available interfaces of the host machine. docker run -p 80:8080 <image> <cmd>
例えばapacheというイメージがあって、それをdeamonでrunして曝す場合
docker run -d -p 80:80 apache
または
docker run -d -p 0.0.0.0:80:80 apache
とか