mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-27 04:05:22 +00:00
Add blank lines around headers
This commit is contained in:
@@ -75,6 +75,7 @@ $ docker port mycontainer
|
||||
80/tcp -> 0.0.0.0:8080
|
||||
80/tcp -> [::]:8080
|
||||
```
|
||||
|
||||
#### docker ps
|
||||
|
||||
运行 `docker ps` 可以查看到所有容器的端口映射列表:
|
||||
@@ -101,6 +102,7 @@ abc123456 nginx 0.0.0.0:8080->80/tcp web
|
||||
|
||||
$ docker run -d -p 127.0.0.1:3306:3306 mysql
|
||||
```
|
||||
|
||||
#### 2. 避免端口冲突
|
||||
|
||||
如果宿主机 8080 已经被占用了,容器将无法启动。
|
||||
|
||||
Reference in New Issue
Block a user