Pull request 1896: fix-docker

Squashed commit of the following:

commit e64194bd053085b6bdcef6dcda40e7b52234a2ec
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Jun 28 18:02:22 2023 +0300

    scripts: fix docker tags
This commit is contained in:
Ainar Garipov 2023-06-28 18:12:45 +03:00
parent c652653ea4
commit 2069eddf98

View file

@ -62,16 +62,21 @@ readonly docker_output
case "$channel" case "$channel"
in in
('release') ('release')
docker_tags="--tag=${docker_image_name}:${version},${docker_image_name}:latest" docker_version_tag="${docker_image_name}:${version}"
docker_channel_tag="${docker_image_name}:latest"
;; ;;
('beta') ('beta')
docker_tags="--tag=${docker_image_name}:${version},${docker_image_name}:beta" docker_version_tag="${docker_image_name}:${version}"
docker_channel_tag="${docker_image_name}:beta"
;; ;;
('edge') ('edge')
docker_tags="--tag=${docker_image_name}:edge" # Don't set the version tag when pushing to the edge channel.
docker_version_tag="${docker_image_name}:edge"
docker_channel_tag="${docker_image_name}"
;; ;;
('development') ('development')
docker_tags="--tag=${docker_image_name}" docker_version_tag="${docker_image_name}"
docker_channel_tag="${docker_image_name}"
;; ;;
(*) (*)
echo "invalid channel '$channel', supported values are\ echo "invalid channel '$channel', supported values are\
@ -79,7 +84,7 @@ in
exit 1 exit 1
;; ;;
esac esac
readonly docker_tags readonly docker_version_tag docker_channel_tag
# Copy the binaries into a new directory under new names, so that it's easier to # Copy the binaries into a new directory under new names, so that it's easier to
# COPY them later. DO NOT remove the trailing underscores. See file # COPY them later. DO NOT remove the trailing underscores. See file
@ -122,6 +127,7 @@ $sudo_cmd docker\
--build-arg VERSION="$version"\ --build-arg VERSION="$version"\
--output "$docker_output"\ --output "$docker_output"\
--platform "$docker_platforms"\ --platform "$docker_platforms"\
"$docker_tags"\ --tag="$docker_version_tag"\
--tag="$docker_channel_tag"\
-f ./docker/Dockerfile\ -f ./docker/Dockerfile\
. .