Skip to content

Commit f6e9a19

Browse files
authored
Update parallel-docker-container-initialization-via-shell-commands.sh
1 parent 729bf9b commit f6e9a19

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

parallel-docker-container-initialization-via-shell-commands.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ function deploy_nginx_cluster() {
77
done
88
}
99

10-
# Do not run containers in interactive mode
1110
function parallelize(){
12-
docker run -d --restart=always --name=centos${idx} -p 808${idx}:80 centos/systemd:latest
13-
docker exec -t centos${idx} /bin/bash -c "yum -y update; yum -y install epel-release; yum -y install nginx; cd /usr/sbin; ./nginx"
11+
docker run -d --restart=always --name=centos$1 -p 808$1:80 centos/systemd:latest
12+
docker exec -t centos$1 /bin/bash -c "yum -y update; yum -y install epel-release; yum -y install nginx; cd /usr/sbin; ./nginx"
1413
}
1514

1615
deploy_nginx_cluster

0 commit comments

Comments
 (0)