Skip to content

Commit

Permalink
Fix Docker tags for specific Debian version (#105)
Browse files Browse the repository at this point in the history
PR #105 and 6a99cd0 introduced support for specifying the Debian version
when building Docker images, ensuring that the version does not change
unexpectedly. This change altered Docker tag syntax by adding the
Debian version release name (currently "bookworm") to all Debian
Docker images. For example, `ghcr.io/br3ndonland/inboard:latest`
became `ghcr.io/br3ndonland/inboard:latest-bookworm`. inboard
is not planning to support multiple Debian versions simultaneously.
inboard will update to the next Debian version, Debian 13 ("trixie")
when it is stable and will provide a new release after the update.
This means there is no need to add the Debian version release name to
the Docker tags.

This commit will update the code in the GitHub Actions workflow
job used to produce Docker tags to match the previous tag syntax. The
latest Debian image will return to `ghcr.io/br3ndonland/inboard:latest`
and the latest Debian slim to `ghcr.io/br3ndonland/inboard:latest-slim`.
Syntax for Alpine Docker images remains unaltered, so tags like
`ghcr.io/br3ndonland/inboard:latest-alpine` are still valid.
  • Loading branch information
br3ndonland committed Apr 11, 2024
1 parent 1d20b7d commit e84fc8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -136,7 +136,9 @@ jobs:
id: setup
run: |
LINUX_VERSION=${{ matrix.linux-version }}
LINUX_TAG=${LINUX_VERSION:+-$LINUX_VERSION}
linux_version_without_debian_release_name="${LINUX_VERSION/bookworm/}"
linux_tag="${linux_version_without_debian_release_name%-}"
LINUX_TAG="${linux_tag:+-$linux_tag}"
PYTHON_VERSION=${{ matrix.python-version }}
PYTHON_TAG="-python$PYTHON_VERSION"
echo "LINUX_VERSION=$LINUX_VERSION" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Expand Up @@ -27,7 +27,7 @@ RUN <<HEREDOC
if [ "$ID" = "alpine" ]; then
apk add --no-cache --virtual .build-deps \
gcc libc-dev libffi-dev make openssl-dev
elif [ "$LINUX_VERSION" = "slim" ]; then
elif [ "${LINUX_VERSION%%-*}" = "slim" ]; then
apt-get update -qy
apt-get install -qy --no-install-recommends \
gcc libc-dev make wget
Expand All @@ -46,7 +46,7 @@ hatch env create base
. /etc/os-release
if [ "$ID" = "alpine" ]; then
apk del .build-deps
elif [ "$LINUX_VERSION" = "slim" ]; then
elif [ "${LINUX_VERSION%%-*}" = "slim" ]; then
apt-get purge --auto-remove -qy \
gcc libc-dev make wget
fi
Expand All @@ -59,7 +59,7 @@ hatch env create fastapi
. /etc/os-release
if [ "$ID" = "alpine" ]; then
apk del .build-deps
elif [ "$LINUX_VERSION" = "slim" ]; then
elif [ "${LINUX_VERSION%%-*}" = "slim" ]; then
apt-get purge --auto-remove -qy \
gcc libc-dev make wget
fi
Expand All @@ -72,7 +72,7 @@ hatch env create starlette
. /etc/os-release
if [ "$ID" = "alpine" ]; then
apk del .build-deps
elif [ "$LINUX_VERSION" = "slim" ]; then
elif [ "${LINUX_VERSION%%-*}" = "slim" ]; then
apt-get purge --auto-remove -qy \
gcc libc-dev make wget
fi
Expand Down

0 comments on commit e84fc8b

Please sign in to comment.