Skip to content
Merged
Changes from all 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
24 changes: 7 additions & 17 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
FROM ${BUILD_FROM}

# Environment variables
ENV \
PATH="/usr/local/bin:$PATH" \
GPG_KEY="7169605F62C751356D054A26A821E680E5FA6305"
ENV PATH="/usr/local/bin:$PATH"

# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install base system
ARG PYTHON_VERSION="v3.13.7"
ARG PYTHON_VERSION="v3.14.0"
ARG PYTHON_SHA256="2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9"
ARG PYTHON_PIP_VERSION="25.3"
ARG PYTHON_SETUPTOOLS_VERSION="80.9.0"

# hadolint ignore=DL3003,DL4006,SC2155
RUN \
apk add --no-cache --virtual .build-dependencies \
Expand All @@ -24,7 +24,6 @@
findutils=4.10.0-r0 \
gcc=14.2.0-r6 \
gdbm-dev=1.24-r0 \
gnupg=2.4.7-r0 \
libffi-dev=3.4.8-r0 \
libnsl-dev=2.0.1-r1 \
libtirpc-dev=1.3.5-r0 \
Expand All @@ -44,21 +43,12 @@
xz-dev=5.8.1-r0 \
xz=5.8.1-r0 \
zlib-dev=1.3.1-r2 \
zstd-dev=1.5.7-r0 \
\
&& curl -J -L -o /tmp/python.tar.xz \
"https://www.python.org/ftp/python/${PYTHON_VERSION#v}/Python-${PYTHON_VERSION#v}.tar.xz" \
&& curl -J -L -o /tmp/python.tar.xz.asc \
"https://www.python.org/ftp/python/${PYTHON_VERSION#v}/Python-${PYTHON_VERSION#v}.tar.xz.asc" \
\
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg \
--batch \
--keyserver hkps://keys.openpgp.org \
--recv-keys "$GPG_KEY" \
&& gpg \
--batch \
--verify /tmp/python.tar.xz.asc /tmp/python.tar.xz \
&& { command -v gpgconf > /dev/null && gpgconf --kill all || :; } \
&& echo "$PYTHON_SHA256 /tmp/python.tar.xz" | sha256sum -c - \
\
&& mkdir -p /usr/src/python \
&& tar -xJC /usr/src/python --strip-components=1 -f /tmp/python.tar.xz \
Expand All @@ -79,6 +69,7 @@
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
LDFLAGS="-Wl,--strip-all" \
PROFILE_TASK="" \
EXTRA_CFLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
&& make install \
\
&& find /usr/local \
Expand Down Expand Up @@ -113,7 +104,6 @@
&& apk del --no-cache --purge .build-dependencies \
&& rm -f -r \
/usr/src \
"$GNUPGHOME" \
/tmp/* \
\
&& python3 --version \
Expand All @@ -136,7 +126,7 @@
ARG BUILD_REPOSITORY

# Labels
LABEL \

Check warning on line 129 in base/Dockerfile

View workflow job for this annotation

GitHub Actions / workflows / Build aarch64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$BUILD_ARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 129 in base/Dockerfile

View workflow job for this annotation

GitHub Actions / workflows / Build amd64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$BUILD_ARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 129 in base/Dockerfile

View workflow job for this annotation

GitHub Actions / workflows / Build aarch64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$BUILD_ARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 129 in base/Dockerfile

View workflow job for this annotation

GitHub Actions / workflows / Build amd64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$BUILD_ARCH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
io.hass.name="Addon Python base for ${BUILD_ARCH}" \
io.hass.description="Home Assistant Community Add-on: ${BUILD_ARCH} Python base image" \
io.hass.arch="${BUILD_ARCH}" \
Expand Down