diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a547f4d..29e6ed4 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -31,7 +31,6 @@ function run-ufw-docker() { declare -a docker_opts=(run --rm -t --name "ufw-docker-agent-${RANDOM}-$(date '+%Y%m%d%H%M%S')" --cap-add NET_ADMIN --network host --env "DEBUG=${DEBUG}" - --env "UFW_DOCKER_FORCE_ADD=yes" -v /var/run/docker.sock:/var/run/docker.sock -v /etc/ufw:/etc/ufw "${ufw_docker_agent_image}" "$@") docker "${docker_opts[@]}" diff --git a/ufw-docker b/ufw-docker index d15423e..b8a4d44 100755 --- a/ufw-docker +++ b/ufw-docker @@ -51,13 +51,6 @@ function ufw-docker--allow() { mapfile -t PORT_PROTO_LIST < <(docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}{{$p}}{{"\n"}}{{end}}{{end}}' "$INSTANCE_NAME" | remove_blank_lines) - if [[ "${UFW_DOCKER_FORCE_ADD:-}" = "yes" ]]; then - for IP in "${INSTANCE_IP_ADDRESSES[@]}"; do - ufw-docker--add-rule "$INSTANCE_NAME" "$IP" "${INSTANCE_PORT}" "${PROTO}" - done - return - fi - if [[ -z "${PORT_PROTO_LIST:-}" ]]; then err "\"$INSTANCE_NAME\" doesn't have any published ports." return 1