docker run -p xx1:xx2指定端口映射,进容器后,再启动里面的网络程序可以么?
仅有的幸福
仅有的幸福 2017-04-26 09:01:05
0
3
692

-p后面直接带网络程序,不大灵活啊。
ps -p可以同时开放很多个网络端口么?

仅有的幸福
仅有的幸福

reply all(3)
曾经蜡笔没有小新

It’s okay, but don’t do it. If you have multiple programs, you should open multiple containers. This is the correct posture of docker

Recommended to use docker-compose

漂亮男人

Yes.
For example, if you use docker to run a nodejs program, the program listens to two ports, such as80803443, 你就需要-p 8080:8080 -p 3443:3443

左手右手慢动作

Docker recommends that a container should only run one service

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template