Skip to content

Commit

Permalink
Don't use Cloud SDK base image.
Browse files Browse the repository at this point in the history
  • Loading branch information
sKoreman committed Nov 5, 2024
1 parent b567243 commit 7e64d65
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 24 deletions.
42 changes: 21 additions & 21 deletions create-latest
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions util/backup-postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
32 changes: 31 additions & 1 deletion util/gcloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 7e64d65

Please sign in to comment.