Pull request: AGDNS-3555-fix-docker

Squashed commit of the following:

commit 87241322bc30589643311bede8a4637890060533
Author: Dimitry Kolyshev <dkolyshev@adguard.com>
Date:   Thu Jan 15 11:27:12 2026 +0700

    scripts: fix docker build
This commit is contained in:
Dimitry Kolyshev 2026-01-16 03:56:47 +00:00
parent ff8ecd9872
commit 95afd050e5
4 changed files with 15 additions and 7 deletions

View file

@ -54,7 +54,6 @@ In this release, the schema version has changed from 32 to 33.
To roll back this change, set the `schema_version` back to `32`.
<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->

View file

@ -165,7 +165,8 @@
REVISION="${bamboo.repository.revision.number}" \
DIST_DIR='dist' \
DOCKER_IMAGE_NAME='adguard/adguardhome' \
DOCKER_OUTPUT="type=image,name=adguard/adguardhome,push=true" \
DOCKER_OUTPUT="type=image,name=adguard/adguardhome" \
DOCKER_PUSH='1' \
VERBOSE='1' \
sh ./scripts/make/build-docker.sh
'environment':

View file

@ -26,7 +26,9 @@ Optional environment:
- `DOCKER_IMAGE_NAME`: the name of the resulting Docker container. By default its `adguardhome-dev`.
- `DOCKER_OUTPUT`: the `--output` parameters. By default they are `type=image,name=${DOCKER_IMAGE_NAME},push=false`.
- `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 its `0`.
- `SUDO`: allow users to use `sudo` or `doas` with `docker`. By default none is used.

View file

@ -49,16 +49,17 @@ readonly build_date
docker_image_name="${DOCKER_IMAGE_NAME:-adguardhome-dev}"
readonly docker_image_name
# Set DOCKER_OUTPUT to 'type=image,name=adguard/adguard-home,push=true' if you
# want (and are allowed) to push to DockerHub.
#
# If you want to inspect the resulting image using commands like "docker image
# ls", change type to docker and also set docker_platforms to a single platform.
#
# See https://github.com/docker/buildx/issues/166.
docker_output="${DOCKER_OUTPUT:-type=image,name=${docker_image_name},push=false}"
docker_output="${DOCKER_OUTPUT:-type=image,name=${docker_image_name}}"
readonly docker_output
# Set DOCKER_PUSH to '1' if you want (and are allowed) to push to DockerHub.
docker_push="${DOCKER_PUSH:-0}"
readonly docker_push
case "$channel" in
'release')
docker_version_tag="--tag=${docker_image_name}:${version}"
@ -149,3 +150,8 @@ docker_opt_tag() {
}
docker_opt_tag
# Push to DockerHub, if requested.
if [ "$docker_push" -eq 1 ]; then
"$sudo_cmd" docker push -a "$docker_image_name"
fi