update to alpine 3.15

This commit is contained in:
Sebastian Hugentobler 2022-02-12 15:32:33 +01:00
parent e78c2aa45c
commit 3ba6aff2d9
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
3 changed files with 14 additions and 27 deletions

View File

@ -3,14 +3,18 @@ stages:
variables: variables:
IMAGE_NAME: thallian/alpine-s6 IMAGE_NAME: thallian/alpine-s6
CI_BUILD_ARCHS: "linux/amd64,linux/arm64"
DOWNSTREAM_PROJECTS: "11 12 14 15 17 18" DOWNSTREAM_PROJECTS: "11 12 14 15 17 18"
build: build:
stage: build stage: build
script: script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
- docker buildx build --platform "$CI_BUILD_ARCHS" --progress plain --pull --tag "$IMAGE_NAME:$CI_COMMIT_SHA" --tag "$IMAGE_NAME:$CI_COMMIT_REF_NAME" --tag "$IMAGE_NAME:latest" --push . - docker build -t $IMAGE_NAME:$CI_COMMIT_SHA .
- docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME .
- docker build -t $IMAGE_NAME:latest .
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
- docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME
- docker push $IMAGE_NAME:latest
- | - |
for proj in $DOWNSTREAM_PROJECTS; do for proj in $DOWNSTREAM_PROJECTS; do
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/$proj/trigger/pipeline curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/$proj/trigger/pipeline

View File

@ -3,19 +3,19 @@ LABEL maintainer="Sebastian Hugentobler <sebastian@vanwa.ch>"
ARG TARGETPLATFORM ARG TARGETPLATFORM
ENV S6_OVERLAY_VERSION=v3.0.0.2 ENV S6_OVERLAY_VERSION=3.0.0.2
ENV SHA256_amd64=a4c039d1515812ac266c24fe3fe3c00c48e3401563f7f11d09ac8e8b4c2d0b0c ENV SHA256_SUM=a4c039d1515812ac266c24fe3fe3c00c48e3401563f7f11d09ac8e8b4c2d0b0c
ENV SHA256_aarch64=e6c15e22dde00af4912d1f237392ac43a1777633b9639e003ba3b78f2d30eb33
RUN apk --no-cache add \ RUN apk --no-cache add \
bash bash
ADD fetch-platform-rootfs / RUN wget "https://github.com/just-containers/s6-overlay/releases/download/v$S6_OVERLAY_VERSION/s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz"
RUN ./fetch-platform-rootfs RUN echo "$SHA256_SUM s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz" | sha256sum -c - || exit 1
RUN mkdir /overlay
RUN tar -xvf s6-overlay.tar.gz -C /overlay
FROM alpine:3.14 RUN mkdir /overlay
RUN tar -xvf s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz -C /overlay
FROM alpine:3.15
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -ex
case $TARGETPLATFORM in
linux-arm64)
ARCH=aarch64
;;
*)
ARCH=amd64
;;
esac
DOWNLOAD="https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-$ARCH.tar.xz"
wget "$DOWNLOAD"
sha256_name=SHA256_$ARCH && echo "${!sha256_name} /s6-overlay-$ARCH.tar.xz" | sha256sum -c - || exit 1
mv /s6-overlay-$ARCH.tar.xz /s6-overlay.tar.xz