pass ufw_docker_agent_image
This commit is contained in:
parent
8eb83755b9
commit
a53fe1ba25
@ -3,6 +3,7 @@
|
|||||||
[[ 0 -eq "$#" ]] && set -- start
|
[[ 0 -eq "$#" ]] && set -- start
|
||||||
|
|
||||||
ufw_docker_agent=ufw-docker-agent
|
ufw_docker_agent=ufw-docker-agent
|
||||||
|
ufw_docker_agent_image="${ufw_docker_agent_image:-chaifeng/${ufw_docker_agent}:181003}"
|
||||||
|
|
||||||
function ufw-update-service-instances() {
|
function ufw-update-service-instances() {
|
||||||
name="$1"
|
name="$1"
|
||||||
|
@ -152,10 +152,12 @@ function ufw-docker--service-allow() {
|
|||||||
docker service create --name "$ufw_docker_agent" --mode global \
|
docker service create --name "$ufw_docker_agent" --mode global \
|
||||||
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
|
||||||
--mount type=bind,source=/etc/ufw,target=/etc/ufw,readonly=true \
|
--mount type=bind,source=/etc/ufw,target=/etc/ufw,readonly=true \
|
||||||
|
--env ufw_docker_agent_image="${ufw_docker_agent_image}" \
|
||||||
--env "${service_env}" \
|
--env "${service_env}" \
|
||||||
"${ufw_docker_agent_image}"
|
"${ufw_docker_agent_image}"
|
||||||
else
|
else
|
||||||
docker service update --update-parallelism=0 \
|
docker service update --update-parallelism=0 \
|
||||||
|
--env-add ufw_docker_agent_image="${ufw_docker_agent_image}" \
|
||||||
--env-add "${service_env}" \
|
--env-add "${service_env}" \
|
||||||
--image "${ufw_docker_agent_image}" \
|
--image "${ufw_docker_agent_image}" \
|
||||||
"${ufw_docker_agent}"
|
"${ufw_docker_agent}"
|
||||||
|
Loading…
Reference in New Issue
Block a user