diff --git a/create-latest b/create-latest index c555987..42d1618 100755 --- a/create-latest +++ b/create-latest @@ -1,32 +1,32 @@ #!/bin/bash -# VERSIONED_IMAGES=$(find core -maxdepth 1 -type d -exec basename {} \; | sort) -# VERSIONED_IMAGES_REV=$(echo "$IMAGES" | tac) -# VERSIONS=$(wget https://alpinelinux.org/releases.json -q -O - | jq -r '.release_branches | map(.rel_branch | sub("v"; ""))[0:5][]') +VERSIONED_IMAGES=$(find core -maxdepth 1 -type d -exec basename {} \; | sort) +VERSIONED_IMAGES_REV=$(echo "$IMAGES" | tac) +VERSIONS=$(wget https://alpinelinux.org/releases.json -q -O - | jq -r '.release_branches | map(.rel_branch | sub("v"; ""))[0:5][]') -# echo Building images: $VERSIONED_IMAGES -# echo Building versions: $VERSIONS +echo Building images: $VERSIONED_IMAGES +echo Building versions: $VERSIONS -# IFS=$'\n' +IFS=$'\n' -# additional_tag="" +additional_tag="" -# for version in $VERSIONS; do -# for image in $VERSIONED_IMAGES; do -# ./create "core/${image}" "${version}" "${additional_tag}" -# done +for version in $VERSIONS; do + for image in $VERSIONED_IMAGES; do + ./create "core/${image}" "${version}" "${additional_tag}" + done -# # Untag all images -# for image in $VERSIONED_IMAGES_REV; do -# docker image rm --force "voormedia/${image}:${version}" -# done + # Untag all images + for image in $VERSIONED_IMAGES_REV; do + docker image rm --force "voormedia/${image}:${version}" + done -# if [ "$version" = "edge" ]; then -# additional_tag="latest" -# elif [ "$LATEST" = true ]; then -# additional_tag="" -# fi -# done + if [ "$version" = "edge" ]; then + additional_tag="latest" + elif [ "$LATEST" = true ]; then + additional_tag="" + fi +done # Build unversioned images ./create util/gcloud latest diff --git a/util/backup-postgresql/Dockerfile b/util/backup-postgresql/Dockerfile index 7c98d7e..74d93d7 100644 --- a/util/backup-postgresql/Dockerfile +++ b/util/backup-postgresql/Dockerfile @@ -1,8 +1,8 @@ FROM voormedia/backup-base:latest RUN \ -apk add --no-cache \ -postgresql16-client + apk add --no-cache \ + postgresql17-client COPY backup-postgresql.sh /srv diff --git a/util/gcloud/Dockerfile b/util/gcloud/Dockerfile index c570a3e..c8bde80 100644 --- a/util/gcloud/Dockerfile +++ b/util/gcloud/Dockerfile @@ -1 +1,31 @@ -FROM google/cloud-sdk:alpine +FROM docker:27.3.1 as static-docker-source + +FROM voormedia/base:edge + +ENV CLOUD_SDK_VERSION=499.0.0 +ENV ARCH=x86_64 +ENV PATH /google-cloud-sdk/bin:$PATH +COPY --from=static-docker-source /usr/local/bin/docker /usr/local/bin/docker +COPY --from=static-docker-source /usr/local/libexec/docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx +RUN addgroup -g 1000 -S cloudsdk && \ + adduser -u 1000 -S cloudsdk -G cloudsdk +RUN apk --no-cache upgrade && apk --no-cache add \ + curl \ + python3 \ + py3-crcmod \ + py3-openssl \ + bash \ + libc6-compat \ + openssh-client \ + git \ + gnupg \ + && curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz && \ + tar xzf google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz && \ + rm google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz && \ + mv google-cloud-sdk /google-cloud-sdk && \ + gcloud config set core/disable_usage_reporting true && \ + gcloud config set component_manager/disable_update_check true && \ + gcloud config set metrics/environment docker_image_alpine && \ + gcloud --version +RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh +VOLUME ["/root/.config"] \ No newline at end of file