docker-compose.yml文件追加zcbusserver1容器内容
zcbusserver1: #修改zcbusserver1容器名
image: reg.zbomc.com/zcbus_server/zcbus_server:v6.0.1
restart: always
environment:
LANG: C.UTF-8
dbuser: "SFVVTjo"
dbpwd: 'SFVVTjo'
dbhost: zcbusdb
dbport: 3306
database: "zcbus"
depends_on:
- zcbusdb
- zcbuskafka
volumes:
- /data/docker/zcbusdata/cache:/usr/local/zcbus/cache
container_name: zcbusserver1 #修改zcbusserver1容器名
添加zcbusserver1容器
[root@zbomc2 zcbusServer]# docker-compose -f docker-compose.yml up --no-recreate -d zcbusserver1
Starting zcbusdb ... done
Starting zcbuszookeeper ... done
Starting zcbuskafka ... done
Creating zcbusserver1 ... done
删除zcbusserver1容器
停止zcbusserver1:
[root@zbomc2 zcbusServer]# docker-compose stop zcbusserver1
Stopping zcbusserver1 ... done
[root@zbomc2 zcbusServer]# docker ps -a|grep zcbusserver1
b8196357453c reg.zbomc.com/zcbus_server/zcbus_server:v6.0.1 "/bin/bash -c ${ZCBU…" 8 minutes ago Exited (137) 13 seconds ago zcbusserver1
删除zcbusserver1:
[root@zbomc2 zcbusServer]# docker-compose rm zcbusserver1
Going to remove zcbusserver1
Are you sure? [yN] y
Removing zcbusserver1 ... done
[root@zbomc2 zcbusServer]# docker ps -a|grep zcbusserver1
[root@zbomc2 zcbusServer]#
问题:
zcbusserver1容器内的下面两个参数,创建前如何手动修改:
ZCBUS_CLUSTERID=0
ZCBUS_CONTAINER=zcbus
文档更新时间: 2021-11-22 15:05 作者:周风磊