diff --git a/scripts/README.md b/scripts/README.md index bcd73c0da..aa8401b58 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -26,8 +26,6 @@ Optional environment: - `DOCKER_IMAGE_NAME`: the name of the resulting Docker container. By default it’s `adguardhome-dev`. -- `DOCKER_OUTPUT`: the `--output` parameters. By default they are `type=image,name=${DOCKER_IMAGE_NAME}`. - - `DOCKER_PUSH`: `1` to push the image to DockerHub, `0` to not push. By default it’s `0`. - `SUDO`: allow users to use `sudo` or `doas` with `docker`. By default none is used. diff --git a/scripts/make/build-docker.sh b/scripts/make/build-docker.sh index 25fbb62c8..b15a2d831 100644 --- a/scripts/make/build-docker.sh +++ b/scripts/make/build-docker.sh @@ -130,6 +130,11 @@ docker_build_opt_tag() { set -- "$@" "$docker_version_tag" fi + # Push to DockerHub, if requested. + if [ "$docker_push" -eq 1 ]; then + set -- "$@" "--push" + fi + # Append the rest. set -- \ "$@" \ @@ -143,18 +148,3 @@ docker_build_opt_tag() { } docker_build_opt_tag - -# maybe_sudo is a function that wraps the call of a command with sudo, if -# requested. -maybe_sudo() { - if [ "$sudo_cmd" != '' ]; then - "$sudo_cmd" "$@" - else - "$@" - fi -} - -# Push to DockerHub, if requested. -if [ "$docker_push" -eq 1 ]; then - maybe_sudo docker push -a "$docker_image_name" -fi