调整运行指令
This commit is contained in:
@@ -6,11 +6,15 @@
|
||||
|
||||
|
||||
### docker 运行命令
|
||||
`docker run -p 51001:51001/udp 51002:51002/udp -v /path/Prod_connect.json:/yuzhen_iot/prod_manage/cfg/Prod_connect.json gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.4`
|
||||
`docker run -d --name yzcol --restart always -v /etc/localtime:/etc/localtime gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.4`
|
||||
|
||||
* -p 51001:51001/udp ,透传UDP端口
|
||||
* -p 51001-51099:51001-51099/udp ,透传UDP端口
|
||||
* -v 挂在配置文件
|
||||
* --name 容器名称,便于查找
|
||||
* --restart always ,自动重启
|
||||
* -d 后台运行
|
||||
* -v /etc/localtime:/etc/localtime ,保持和主机相同时区
|
||||
|
||||
### 设置自动重启
|
||||
`docker update --restart=always ${CONTAINER}`
|
||||
Reference in New Issue
Block a user