From f7410930842173fda63eb394d287f353f6fce5ce Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Sun, 5 Jan 2025 09:33:18 +0800 Subject: [PATCH] Updates to Alpine 3.21.0 (#49) Signed-off-by: Adrian Cole --- Dockerfile | 8 ++++---- README.md | 10 +++++----- build-bin/test | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index aed37f2..88af2d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ # When updating, update the README and the alpine_version ARG # * Use current version from https://alpinelinux.org/downloads/ # * ARGs repeat because Dockerfile ARGs are layer specific but will reuse the value defined here. -ARG alpine_version=3.20.3 +ARG alpine_version=3.21.0 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. @@ -20,7 +20,7 @@ COPY . /code/ # See from a previously published version to avoid pulling from Docker Hub (docker.io) # This version is only used to install the real version -FROM ghcr.io/openzipkin/alpine:3.20.2 AS install +FROM ghcr.io/openzipkin/alpine:3.20.3 AS install WORKDIR /code # Conditions aren't supported in Dockerfile instructions, so we copy source even if it isn't used. @@ -56,7 +56,7 @@ RUN \ # will throw UnknownHostException as the local hostname isn't in DNS. echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \ # - # Exclusively use edge repos to get recent packages, but avoid conflicts with 3.20 + # Exclusively use edge repos to get recent packages, but avoid conflicts with 3.21 echo 'https://dl-cdn.alpinelinux.org/alpine/edge/main' > /etc/apk/repositories && \ echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \ echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \ @@ -66,6 +66,6 @@ RUN \ # * gcompat: BoringSSL for Netty per https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty apk add --no-cache java-cacerts ca-certificates gcompat && \ # Typically, only amd64 is tested in CI: Run a command to ensure binaries match current arch. - ldd /lib/libz.so.1 + ldd /usr/lib/libz.so.1 ENTRYPOINT ["/bin/sh"] diff --git a/README.md b/README.md index b4e6db1..a083230 100644 --- a/README.md +++ b/README.md @@ -13,22 +13,22 @@ This is an internal base layer primarily used in [docker-java](https://github.co To browse the image, run it in interactive mode with TTY enabled like so: ```bash -docker run -ti --rm ghcr.io/openzipkin/alpine:3.20.3 +docker run -ti --rm ghcr.io/openzipkin/alpine:3.21.0 / # ``` ## Release process Build the `Dockerfile` using the current version from https://alpinelinux.org/downloads/: ```bash -# Note 3.20.3 not 3.20! -./build-bin/build 3.20.3 +# Note 3.21.0 not 3.21! +./build-bin/build 3.21.0 ``` Next, verify the built image matches that version: ```bash docker run --rm openzipkin/alpine:test -c 'cat /etc/alpine-release' -3.20.3 +3.21.0 ``` -To release the image, push a tag matching the arg to `build-bin/build` (ex `3.20.3`). +To release the image, push a tag matching the arg to `build-bin/build` (ex `3.21.0`). This triggers a [GitHub Actions](https://github.com/openzipkin/docker-alpine/actions) job to push the image. diff --git a/build-bin/test b/build-bin/test index f94c6ec..72caac1 100755 --- a/build-bin/test +++ b/build-bin/test @@ -8,4 +8,4 @@ build-bin/build echo "Verifying Docker image..." # Invoke a binary in gcompat to ensure arch matches -docker run --rm openzipkin/alpine:test -c 'ldd /lib/libz.so.1' +docker run --rm openzipkin/alpine:test -c 'ldd /usr/lib/libz.so.1'