Docker network host conflicting ports3/24/2024 -p: inside the container port is bound to the specified host port.-P: Is mapped to the inside of the container port random high port on the host.We can also use the -p flag to specify the container port is bound to the host port. :~$ docker psĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESįce072cc88ce training/webapp "python app.py" 4 minutes ago Up 4 minutes 0.0.0.0:32768->5000/tcp grave_hopper We use the -P parameter to create a container, use docker ps port 5000 is bound to see a host port 32768. In addition, we can specify the network address binding container, such as binding 127.0.0.1. We created a python application container. In front of us to achieve access to the network through the port is operating in the docker container services.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |