Skip to content

Commit

Permalink
Updates to Alpine 3.21.0 (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt authored Jan 5, 2025
1 parent 2697595 commit f741093
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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 && \
Expand All @@ -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"]
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion build-bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit f741093

Please sign in to comment.