From cf7368563b68f2f0509133c071e32ca58762be6a Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Tue, 27 Jan 2026 10:16:54 +0000 Subject: [PATCH] Pull request 2566: AGDNS-3555-fix-docker Squashed commit of the following: commit 6fc2920056ece71f3b1b7cbd1631fe71b994496e Author: Ainar Garipov Date: Tue Jan 27 13:04:32 2026 +0300 scripts: rm unused func commit 45c83af75f249d443006c6875f8b3f1bbcce39bb Author: Dimitry Kolyshev Date: Tue Jan 27 15:44:58 2026 +0700 scripts: imp docker build commit f63adc68d2942032e58e4290411fae2b46efd749 Author: Dimitry Kolyshev Date: Tue Jan 27 15:22:51 2026 +0700 scripts: imp docker build commit 48064db5e5129e3836893cbe970b4f172ff881a3 Author: Dimitry Kolyshev Date: Tue Jan 27 12:36:42 2026 +0700 scripts: imp docker build --- scripts/README.md | 2 -- scripts/make/build-docker.sh | 20 +++++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) 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