I've started multiple container services using docker-compose with following command -
docker-compose up -d --scale cluster-service=3
This starts three container services -
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
87b60bd2554c xxx.xxx.xxx.xxx:5000/cluster-service:1.1.1 "java -cp cluster-se…" 7 minutes ago Up 7 minutes 0.0.0.0:9077->47100/tcp, 0.0.0.0:9076->47500/tcp testcluser_cluster-service_1
b631a656f8ae xxx.xxx.xxx.xxx:5000/cluster-service:1.1.1 "java -cp cluster-se…" 7 minutes ago Up 7 minutes 0.0.0.0:9075->47100/tcp, 0.0.0.0:9074->47500/tcp testcluser_cluster-service_2
f3aeb9541fe9 xxx.xxx.xxx.xxx:5000/cluster-service:1.1.1 "java -cp cluster-se…" 7 minutes ago Up 7 minutes 0.0.0.0:9073->47100/tcp, 0.0.0.0:9072->47500/tcp testcluser_cluster-service_3
In Jenkins pipeline, using shell script, I want to get container ids in the cluster. How can I achieve this with shell script?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…