From 18da70fe3004e29a57d03fc033b7c878b3ee7616 Mon Sep 17 00:00:00 2001 From: Felddy Date: Sun, 29 Dec 2024 18:30:17 -0500 Subject: [PATCH 1/4] Switch from cross-compilation to QEMU-based emulation This change removes the `tonistiigi/xx` cross-compilation toolchain and instead relies on QEMU-based emulation for building multi-platform images. The Dockerfile is simplified by eliminating platform-specific commands (`xx-apt`) and dependencies. Supported platforms are now limited to those that successfully build with the emulation approach. Platforms requiring additional changes can be added later via PRs. --- Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 399ba41..dfe4e13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,9 @@ ARG PYTHON_VERSION=3.13.0 ARG WEEWX_UID=1000 ARG WEEWX_HOME="/home/weewx" -FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx +FROM python:${PYTHON_VERSION} AS build-stage -FROM --platform=$BUILDPLATFORM python:${PYTHON_VERSION} AS build-stage - -COPY --from=xx / / RUN apt-get update && apt-get install -y clang lld -ARG TARGETPLATFORM -RUN xx-apt install -y libc6-dev WORKDIR /tmp RUN \ From 06f0b43aec832c8d466ba3b20e4365a45b7a23f2 Mon Sep 17 00:00:00 2001 From: Felddy Date: Sun, 29 Dec 2024 20:01:31 -0500 Subject: [PATCH 2/4] Shorten weewx image tag to 5 --- README.md | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0bbe64..33a1d15 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ name: "weewx" services: weewx: - image: felddy/weewx:5.1.0 + image: felddy/weewx:5 volumes: - type: bind source: ./data diff --git a/docker-compose.yml b/docker-compose.yml index ed58416..4014846 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ volumes: services: weewx: - image: felddy/weewx:5.1.0 + image: felddy/weewx:5 # devices: # - "/dev/ttyUSB0:/dev/ttyUSB0" volumes: From 3faeb326efa114befe3d644032221b76bd2dc712 Mon Sep 17 00:00:00 2001 From: Felddy Date: Sun, 29 Dec 2024 20:01:55 -0500 Subject: [PATCH 3/4] Update version to 5.1.0+r1 --- src/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_version.py b/src/_version.py index 0d72820..082142c 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1 +1 @@ -__version__ = "5.1.0" +__version__ = "5.1.0+r1" From 5f503da00b91d0508f2137b1828e81ad545d8248 Mon Sep 17 00:00:00 2001 From: Felddy Date: Sun, 29 Dec 2024 20:13:18 -0500 Subject: [PATCH 4/4] Report version from version file instead of weewxd --- src/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index e42c026..fb937b7 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -9,7 +9,7 @@ CONF_FILE="${WEEWX_ROOT}/weewx.conf" # echo version if [ $# -gt 0 ] && [ "$1" = "--version" ]; then - weewxd --version + python -c "import _version; print(_version.__version__)" exit 0 fi