Pull request 2566: AGDNS-3555-fix-docker

Squashed commit of the following:

commit 6fc2920056ece71f3b1b7cbd1631fe71b994496e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jan 27 13:04:32 2026 +0300

    scripts: rm unused func

commit 45c83af75f249d443006c6875f8b3f1bbcce39bb
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date:   Tue Jan 27 15:44:58 2026 +0700

    scripts: imp docker build

commit f63adc68d2942032e58e4290411fae2b46efd749
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date:   Tue Jan 27 15:22:51 2026 +0700

    scripts: imp docker build

commit 48064db5e5129e3836893cbe970b4f172ff881a3
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date:   Tue Jan 27 12:36:42 2026 +0700

    scripts: imp docker build
This commit is contained in:
Dimitry Kolyshev authored and Ainar Garipov committed 2026-01-27 10:16:54 +00:00
1 parent 97b7cd2b4b
commit cf7368563b
2 files changed
+5 -17

No files matched your search

-2
View File
@@ -26,8 +26,6 @@ Optional environment:
- `DOCKER_IMAGE_NAME`: the name of the resulting Docker container. By default it’s `adguardhome-dev`. - `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`. - `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. - `SUDO`: allow users to use `sudo` or `doas` with `docker`. By default none is used.
+5 -15
View File
@@ -130,6 +130,11 @@ docker_build_opt_tag() {
set -- "$@" "$docker_version_tag" set -- "$@" "$docker_version_tag"
fi fi
# Push to DockerHub, if requested.
if [ "$docker_push" -eq 1 ]; then
set -- "$@" "--push"
fi
# Append the rest. # Append the rest.
set -- \ set -- \
"$@" \ "$@" \
@@ -143,18 +148,3 @@ docker_build_opt_tag() {
} }
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