From f759a84af419186a2bac6652e0f06dc791d63377 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 20 Jan 2023 10:32:38 +0000 Subject: SearXNG version: fix make docker continuation of #2117 related to #2111 This commit: * fixes the Docker tag using an additional variable DOCKER_TAG, see searx/version.py * fixes the Docker labels org.label-schema.vcs-ref and org.opencontainers.image.revision * adds searx/version_frozen to .gitignore --- manage | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'manage') diff --git a/manage b/manage index d61237984..b79a9e5eb 100755 --- a/manage +++ b/manage @@ -478,7 +478,7 @@ docker.build() { eval "$(python -m searx.version)" # Get the last git commit id - VERSION_GITCOMMIT=$(echo "$VERSION_STRING" | cut -d- -f3) + VERSION_GITCOMMIT=$(echo "$VERSION_TAG" | cut -d+ -f2) build_msg DOCKER "Last commit : $VERSION_GITCOMMIT" # define the docker image name @@ -500,6 +500,7 @@ docker.build() { docker $BUILD \ --build-arg BASE_IMAGE="${DEPENDENCIES_IMAGE_NAME}" \ --build-arg GIT_URL="${GIT_URL}" \ + --build-arg SEARXNG_DOCKER_TAG="${DOCKER_TAG}" \ --build-arg SEARXNG_GIT_VERSION="${VERSION_STRING}" \ --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \ --build-arg LABEL_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ @@ -507,11 +508,11 @@ docker.build() { --build-arg LABEL_VCS_URL="${GIT_URL}" \ --build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searx/settings.yml)" \ --build-arg TIMESTAMP_UWSGI="$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini)" \ - -t "${SEARXNG_IMAGE_NAME}:latest" -t "${SEARXNG_IMAGE_NAME}:${VERSION_STRING}" . + -t "${SEARXNG_IMAGE_NAME}:latest" -t "${SEARXNG_IMAGE_NAME}:${DOCKER_TAG}" . if [ "$1" = "push" ]; then docker push "${SEARXNG_IMAGE_NAME}:latest" - docker push "${SEARXNG_IMAGE_NAME}:${SEARXNG_GIT_VERSION}" + docker push "${SEARXNG_IMAGE_NAME}:${DOCKER_TAG}" fi ) dump_return $? -- cgit v1.2.3