静态化迁移
This commit is contained in:
@@ -29,7 +29,8 @@ docker run \
|
||||
--rm \
|
||||
--name testnginx \
|
||||
--volume "/test/html":/usr/share/nginx/html \
|
||||
-p 8080:80
|
||||
-p 8080:80 \
|
||||
nginx:latest
|
||||
```
|
||||
+ volume是本地目录与容器内目录的映射, 前面是本地目录, 后面是容器内目录
|
||||
也可以使用`mount`参数
|
||||
@@ -118,8 +119,9 @@ docker run \
|
||||
--name testnginx \
|
||||
--volume "/test/html":/usr/share/nginx/html \
|
||||
--volume "/test/conf":/etc/nginx \
|
||||
-p 8080:80
|
||||
-p 8443:443
|
||||
-p 8080:80 \
|
||||
-p 8443:443 \
|
||||
nginx:latest
|
||||
```
|
||||
> 这里容器内程序启动占用的端口取决于配置, 如果有修改, 端口映射需要对应
|
||||
|
||||
|
||||
Reference in New Issue
Block a user