Port
If you've built any multi-container applications, chances are you've had to define some rules in order to manage ports. There are several ways to do this:
--exposeflag at runtimeEXPOSEinstruction in the Dockerfilepublish ports by using the
-por-Pflags withhyper run
The behavior of container port in Hyper is very simple:
All containers in the same network are inter-accessible; all ports are open within the network by default
-Pflag publishes all ports exposed by--exposeflag at runtime, orEXPOSEinstruction in the Dockerfile-pcreates a port mapping rule like-p hostPort:containerPort.containerPortis required. If nohostPortis specified, Hyper will use the same port ascontainerPort
Last updated