Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 20 additions & 53 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ env:
ALPINE_LATEST: "3.22"
DEBIAN_LATEST: "trixie"
UBUNTU_LATEST: "24.04"
RASPBIAN_LATEST: "trixie"
PYTHON_LATEST: "3.13"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PYTHON_LATEST: "3.13"
PYTHON_LATEST: "3.14"

The default for Python should be updated to 3.14. It was deferred previously as 3.14 was only added from amd64 and aarch64.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's do it as a separate PR, so it's more prominent in the changelog?


jobs:
init:
name: Initialize build
runs-on: &runs-on-ubuntu ubuntu-24.04
runs-on: ubuntu-24.04
outputs:
architectures_alpine: ${{ steps.info_alpine.outputs.architectures }}
architectures_debian: ${{ steps.info_debian.outputs.architectures }}
architectures_ubuntu: ${{ steps.info_ubuntu.outputs.architectures }}
architectures_raspbian: ${{ steps.info_raspbian.outputs.architectures }}
release: ${{ steps.version.outputs.version }}
steps:
- name: Checkout the repository
Expand All @@ -48,12 +46,6 @@ jobs:
with:
path: "${{ github.workspace }}/ubuntu"

- name: Get information Raspbian
id: info_raspbian
uses: home-assistant/actions/helpers/info@master
with:
path: "${{ github.workspace }}/raspbian"

- name: Get version
id: version
uses: home-assistant/actions/helpers/version@master
Expand All @@ -63,7 +55,7 @@ jobs:
build_alpine:
name: Build ${{ matrix.arch }} alpine ${{ matrix.version }} base image
needs: init
runs-on: *runs-on-ubuntu
runs-on: &builder-runs-on ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
runs-on: &builder-runs-on ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
runs-on: ${{ matrix.os }}

I'd suggest to use matrix.include instead. This looks cleaner than the ternary expression here. Will leave a suggestion below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it's a matter of personal preference, I find this more readable than wrapping my head around how the matrix looks like with overrides and additions in include - although with just two combinations it's not that much convoluted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matrix.include is more durable. Add a comment if you need to explain the code what is the expected range of values.

permissions: &permissions
contents: read
id-token: write
Expand Down Expand Up @@ -98,6 +90,7 @@ jobs:
- name: Build base image
uses: home-assistant/[email protected]
with:
image: ${{ matrix.arch }}
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
Expand All @@ -109,12 +102,16 @@ jobs:
build_debian:
name: Build ${{ matrix.arch }} debian ${{ matrix.version }} base image
needs: init
runs-on: *runs-on-ubuntu
runs-on: *builder-runs-on
permissions: *permissions
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures_debian) }}
version: ["bookworm", "trixie"]
exclude:
- arch: "armv7"
- arch: "armhf"
- arch: "i386"
steps:
- *checkout
- *login-container-registry
Expand All @@ -131,6 +128,7 @@ jobs:
- name: Build base image
uses: home-assistant/[email protected]
with:
image: ${{ matrix.arch }}
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
Expand All @@ -143,12 +141,16 @@ jobs:
build_ubuntu:
name: Build ${{ matrix.arch }} ubuntu ${{ matrix.version }} base image
needs: init
runs-on: *runs-on-ubuntu
runs-on: *builder-runs-on
permissions: *permissions
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures_ubuntu) }}
version: ["16.04", "18.04", "20.04", "22.04", "24.04"]
exclude:
- arch: "armv7"
- arch: "armhf"
- arch: "i386"
steps:
- *checkout
- *login-container-registry
Expand All @@ -165,6 +167,7 @@ jobs:
- name: Build base image
uses: home-assistant/[email protected]
with:
image: ${{ matrix.arch }}
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
Expand All @@ -173,44 +176,10 @@ jobs:
--release ${{ needs.init.outputs.release }} \
--base ${{ matrix.version }}

build_raspbian:
name: Build ${{ matrix.arch }} raspbian ${{ matrix.version }} base image
needs: init
runs-on: *runs-on-ubuntu
permissions: *permissions
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures_raspbian) }}
version: ["bookworm", "trixie"]
steps:
- *checkout
- *login-container-registry

- name: Set build arguments
shell: bash
run: |
if [[ "${{ github.event_name }}" != "release" ]]; then
echo "BUILD_ARGS=--test" >> $GITHUB_ENV
elif [[ "${{ env.RASPBIAN_LATEST }}" != "${{ matrix.version }}" ]]; then
echo "BUILD_ARGS=--no-latest" >> $GITHUB_ENV
fi

- name: Build base image
uses: home-assistant/[email protected]
with:
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
--target /data/raspbian \
--cosign \
--release ${{ needs.init.outputs.release }} \
--version-from ${{ matrix.version }}-slim \
--base ${{ matrix.version }}

build_python:
name: Build ${{ matrix.arch }} alpine ${{ matrix.version }} - python ${{ matrix.python }} base image
needs: [init, build_alpine]
runs-on: *runs-on-ubuntu
runs-on: *builder-runs-on
permissions: *permissions
strategy:
fail-fast: false
Expand All @@ -219,12 +188,9 @@ jobs:
version: ["3.20", "3.21", "3.22"]
python: ["3.12", "3.13", "3.14"]
exclude:
- python: "3.14"
arch: "armv7"
- python: "3.14"
arch: "armhf"
- python: "3.14"
arch: "i386"
- arch: "armv7"
- arch: "armhf"
- arch: "i386"
steps:
- *checkout
- *login-container-registry
Expand All @@ -241,6 +207,7 @@ jobs:
- name: Build base image
uses: home-assistant/[email protected]
with:
image: ${{ matrix.arch }}
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
Expand Down
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ We support version that are not EOL: https://alpinelinux.org/releases/

| Image | OS | Tags | latest |
|-------|----|------|--------|
| armhf-base | Alpine | 3.20, 3.21, 3.22 | 3.22 |
| armv7-base | Alpine | 3.20, 3.21, 3.22 | 3.22 |
| aarch64-base | Alpine | 3.20, 3.21, 3.22 | 3.22 |
| amd64-base | Alpine | 3.20, 3.21, 3.22 | 3.22 |
| i386-base | Alpine | 3.20, 3.21, 3.22 | 3.22 |

### jemalloc

Expand All @@ -27,17 +24,10 @@ We support on our platforms jemalloc. On the application which you want to enabl

We support the latest 3 release with the latest 3 Alpine version.

> [!NOTE]
> Python 3.14 will only be available on `aarch64` and `amd64` following the deprecation of `armhf`, `armv7` and `i386`.
> See https://www.home-assistant.io/blog/2025/05/22/deprecating-core-and-supervised-installation-methods-and-32-bit-systems/

| Image | OS | Python versions | Tags | latest |
|-------|----|-----------------|------|--------|
| armhf-base-python | Alpine | 3.12, 3.13 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22 | 3.13-alpine3.22 |
| armv7-base-python | Alpine | 3.12, 3.13 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22 | 3.13-alpine3.22 |
| aarch64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.13-alpine3.22 |
| amd64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.13-alpine3.22 |
Comment on lines 29 to 30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| aarch64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.13-alpine3.22 |
| amd64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.13-alpine3.22 |
| aarch64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.14-alpine3.22 |
| amd64-base-python | Alpine | 3.12, 3.13, 3.14 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22, 3.14-alpine3.20, 3.14-alpine3.21, 3.14-alpine3.22 | 3.14-alpine3.22 |

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

| i386-base-python | Alpine | 3.12, 3.13 | 3.12-alpine3.20, 3.12-alpine3.21, 3.12-alpine3.22, 3.13-alpine3.20, 3.13-alpine3.21, 3.13-alpine3.22 | 3.13-alpine3.22 |

## Others

Expand All @@ -47,25 +37,14 @@ We support the latest 3 release with the latest 3 Alpine version.

| Image | OS | Tags | latest |
|-------|----|------|--------|
| armv7-base-debian | Debian | bookworm, trixie | trixie |
| armhf-base-debian | Debian | bookworm, trixie | trixie |
| aarch64-base-debian | Debian | bookworm, trixie | trixie |
| amd64-base-debian | Debian | bookworm, trixie | trixie |
| i386-base-debian | Debian | bookworm, trixie | trixie |

### Ubuntu images

**Note**: We prefer the alpine based version because it's more IoT friendly. In some case, you need a glibc system like this.

| Image | OS | Tags | latest |
|-------|----|------|--------|
| armv7-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04, 20.04, 22.04, 24.04 | 24.04 |
| aarch64-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04, 20.04, 22.04, 24.04 | 24.04 |
| amd64-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04, 20.04, 22.04, 24.04 | 24.04 |
| i386-base-ubuntu | Ubuntu | 14.04, 16.04, 18.04 | |

### Raspbian images

| Image | OS | Tags | latest |
|-------|----|------|--------|
| armhf-base-raspbian | Raspbian | bookworm, trixie | trixie |
9 changes: 1 addition & 8 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG BUILD_FROM
# amd64: alpine:${VERSION}
# i386: i386/alpine:${VERSION}
# aarch64: arm64v8/alpine:${VERSION}
# armv7: arm32v7/alpine:${VERSION}
# armhf: arm32v6/alpine:${VERSION}

FROM ${BUILD_FROM}

Expand Down Expand Up @@ -48,11 +45,7 @@ RUN \
autoconf \
git \
\
&& if [ "${BUILD_ARCH}" = "armv7" ]; then \
export S6_ARCH="arm"; \
elif [ "${BUILD_ARCH}" = "i386" ]; then \
export S6_ARCH="i686"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then \
&& if [ "${BUILD_ARCH}" = "amd64" ]; then \
export S6_ARCH="x86_64"; \
else \
export S6_ARCH="${BUILD_ARCH}"; \
Expand Down
3 changes: 0 additions & 3 deletions alpine/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
image: ghcr.io/home-assistant/{arch}-base
build_from:
aarch64: "arm64v8/alpine:"
armv7: "arm32v7/alpine:"
armhf: "arm32v6/alpine:"
amd64: "alpine:"
i386: "i386/alpine:"
cosign:
identity: https://github.com/home-assistant/docker-base/.*
args:
Expand Down
9 changes: 1 addition & 8 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG BUILD_FROM
# amd64: debian:${VERSION}-slim
# i386: i386/debian:${VERSION}-slim
# aarch64: arm64v8/debian:${VERSION}-slim
# armv7: arm32v7/debian:${VERSION}-slim
# armhf: arm32v5/debian:${VERSION}-slim

FROM ${BUILD_FROM}

Expand Down Expand Up @@ -42,11 +39,7 @@ RUN \
xz-utils \
&& mkdir -p /usr/share/man/man1 \
\
&& if [ "${BUILD_ARCH}" = "armv7" ]; then \
export S6_ARCH="arm"; \
elif [ "${BUILD_ARCH}" = "i386" ]; then \
export S6_ARCH="i686"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then \
&& if [ "${BUILD_ARCH}" = "amd64" ]; then \
export S6_ARCH="x86_64"; \
else \
export S6_ARCH="${BUILD_ARCH}"; \
Expand Down
3 changes: 0 additions & 3 deletions debian/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
image: ghcr.io/home-assistant/{arch}-base-debian
build_from:
aarch64: "arm64v8/debian:"
armv7: "arm32v7/debian:"
armhf: "arm32v5/debian:"
amd64: "debian:"
i386: "i386/debian:"
cosign:
identity: https://github.com/home-assistant/docker-base/.*
args:
Expand Down
3 changes: 0 additions & 3 deletions python/3.12/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
image: ghcr.io/home-assistant/{arch}-base-python
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base:"
armv7: "ghcr.io/home-assistant/armv7-base:"
armhf: "ghcr.io/home-assistant/armhf-base:"
amd64: "ghcr.io/home-assistant/amd64-base:"
i386: "ghcr.io/home-assistant/i386-base:"
cosign:
base_identity: https://github.com/home-assistant/docker-base/.*
identity: https://github.com/home-assistant/docker-base/.*
Expand Down
3 changes: 0 additions & 3 deletions python/3.13/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
image: ghcr.io/home-assistant/{arch}-base-python
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base:"
armv7: "ghcr.io/home-assistant/armv7-base:"
armhf: "ghcr.io/home-assistant/armhf-base:"
amd64: "ghcr.io/home-assistant/amd64-base:"
i386: "ghcr.io/home-assistant/i386-base:"
cosign:
base_identity: https://github.com/home-assistant/docker-base/.*
identity: https://github.com/home-assistant/docker-base/.*
Expand Down
3 changes: 0 additions & 3 deletions python/3.14/build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
image: ghcr.io/home-assistant/{arch}-base-python
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base:"
armv7: "ghcr.io/home-assistant/armv7-base:"
armhf: "ghcr.io/home-assistant/armhf-base:"
amd64: "ghcr.io/home-assistant/amd64-base:"
i386: "ghcr.io/home-assistant/i386-base:"
cosign:
base_identity: https://github.com/home-assistant/docker-base/.*
identity: https://github.com/home-assistant/docker-base/.*
Expand Down
65 changes: 0 additions & 65 deletions raspbian/Dockerfile

This file was deleted.

Loading