From 9cd72ea51b25a16ffea0c17f35300daac060e30d Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 13 Jul 2026 15:07:44 -0500 Subject: [PATCH 1/4] feat: update debian BREAKING CHANGE: updated from debian bullseye to debian trixie --- .github/workflows/test-publish.yaml | 2 +- image/Dockerfile | 32 +++++++++++++++++++++++++++-- root-image/Dockerfile | 3 ++- tests/test.sh | 26 ++++++++++++++++++++++- 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-publish.yaml b/.github/workflows/test-publish.yaml index 710cd1d..ff353dc 100644 --- a/.github/workflows/test-publish.yaml +++ b/.github/workflows/test-publish.yaml @@ -43,7 +43,7 @@ jobs: - '--release=3.3.2' - '--release=3.4.1' # Latest version - - + - 'latest' steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/image/Dockerfile b/image/Dockerfile index bc4217b..074e3d8 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -1,9 +1,37 @@ -FROM debian:bullseye-slim +# trixie doesn't have python 2, so we copy it from bullseye +FROM debian:bullseye-slim AS python2 +RUN apt-get update && \ + apt-get install -y python2.7 libpython2.7 libssl1.1 --no-install-recommends && \ + rm -rf /var/lib/apt/lists/* + +FROM debian:trixie-slim LABEL maintainer="zodern" + +# libnsl2 needed for python 2 RUN apt-get update && \ - apt-get install -y curl python python3 make g++ bzip2 ca-certificates --no-install-recommends && \ + apt-get install -y curl python3 make g++ bzip2 ca-certificates libnsl2 --no-install-recommends && \ rm -rf /var/lib/apt/lists/* +# Copy python 2 and make sure nothing is missing +COPY --from=python2 /usr/bin/python2.7 /usr/bin/python2.7 +COPY --from=python2 /usr/lib/python2.7 /usr/lib/python2.7 +COPY --from=python2 /usr/lib/*-linux-gnu/libpython2.7.so.1.0 /usr/local/lib/ +COPY --from=python2 /usr/lib/*-linux-gnu/libssl.so.1.1 /usr/local/lib/ +COPY --from=python2 /usr/lib/*-linux-gnu/libcrypto.so.1.1 /usr/local/lib/ +COPY --from=python2 /usr/lib/*-linux-gnu/libffi.so.7.* /usr/local/lib/ +RUN ldconfig && \ + set -e && \ + for module in /usr/lib/python2.7/lib-dynload/*.so; do \ + if ldd "$module" | grep -q 'not found'; then \ + echo "Missing dependency for $module"; \ + ldd "$module"; \ + exit 1; \ + fi; \ + done && \ + python2.7 -c 'import ssl, hashlib, ctypes, bz2, readline, sqlite3, zlib, nis' && \ + ln -s /usr/bin/python2.7 /usr/bin/python2 && \ + ln -s /usr/bin/python2.7 /usr/bin/python + RUN useradd --create-home --shell /bin/bash --uid 1000 --user-group app RUN mkdir /built_app && \ diff --git a/root-image/Dockerfile b/root-image/Dockerfile index b119abc..14bb31a 100644 --- a/root-image/Dockerfile +++ b/root-image/Dockerfile @@ -9,7 +9,8 @@ RUN export VERSION="2.1.1" && \ mkdir phantomjs && \ tar xvjf phantomjs.tar.bz2 -C ./phantomjs --strip-components=1 && \ mv phantomjs /usr/local/share && \ - ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \ + printf '#!/bin/sh\n# phantomjs statically links an old OpenSSL that can not read the\n# openssl.cnf in newer Debian versions\nOPENSSL_CONF=/dev/null exec /usr/local/share/phantomjs/bin/phantomjs "$@"\n' > /usr/local/bin/phantomjs && \ + chmod +x /usr/local/bin/phantomjs && \ rm -rf ./phantomjs ./phantomjs.tar.bz2 ONBUILD USER root ONBUILD ARG NODE_VERSION='8.17.0' diff --git a/tests/test.sh b/tests/test.sh index ebdd84a..cc3beff 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -77,6 +77,7 @@ test_bundle() { -e "NPM_INSTALL_OPTIONS=--no-bin-links" \ -e "NODE_TLS_REJECT_UNAUTHORIZED=0" \ -e "npm_config_strict_ssl=false" \ + $EXTRA_DOCKER_ARGS \ -p 3000:3000 \ -d \ --name meteor-docker-test \ @@ -172,6 +173,21 @@ test_version() { verify } +# UWS requires a newer glibc version. Make sure it works with the base image. +# Reuses the app created by the previous test_version call +# TODO: create new app +test_uws_transport() { + echo "=> Testing uws DDP transport" + build_app + EXTRA_DOCKER_ARGS="-e DDP_TRANSPORT=uws" test_bundle + verify +} + +test_latest() { + test_version + test_uws_transport +} + test_versions() { echo "--- Testing Docker Image $DOCKER_IMAGE ---" @@ -201,7 +217,9 @@ test_versions() { test_version "--release=2.13.3" # Latest version - test_version + test_latest + elif [[ "$METEOR_TEST_OPTION" == "latest" ]]; then + test_latest else test_version "$METEOR_TEST_OPTION" fi @@ -218,4 +236,10 @@ test_versions DOCKER_IMAGE="zodern/meteor:root" NPM_OPTIONS="--unsafe-perm" + +if [[ -z ${METEOR_TEST_OPTION+x} || "$METEOR_TEST_OPTION" == "latest" ]]; then + echo "=> Checking phantomjs" + docker run --rm --entrypoint phantomjs "$DOCKER_IMAGE" --version +fi + test_versions From c19666da87174eaa577687c2f90ad1c8b85cd409 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 13 Jul 2026 15:32:48 -0500 Subject: [PATCH 2/4] docs: update readme --- readme.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 3434516..4b8517d 100644 --- a/readme.md +++ b/readme.md @@ -7,8 +7,7 @@ Docker image to run Meteor apps. ### Features -- One image supports every Meteor version (tested with 1.2 - 2.13 and newer) -- Mostly supports Meteor 3 (requires making `programs/server/shrinkwrap.json` [writable](https://github.com/meteor/meteor/issues/12932) due to a bug in Meteor 3) +- One image supports every Meteor version (tested with 1.2 - 3.5) - Automatically uses correct node and npm version - Runs app as non-root user - Compatible with Meteor up @@ -17,9 +16,13 @@ Docker image to run Meteor apps. - `zodern/meteor` The recommended version. Runs the app as a non-root user. - `zodern/meteor:root` Compatible with meteord. Runs the app as the root user and has phantomjs installed. Any notes below about permissions do not apply to this image. -- `zodern/meteor:` or `zodern/meteor:-root` (for example, `zodern/meteor:1`) Use the latest minor or patch version, without any breaking changes in a new major version (such as changing to a newer Debian base image). +- `zodern/meteor:` or `zodern/meteor:-root` (for example, `zodern/meteor:1`) Use the latest minor or patch version, without any breaking changes from a new major version (such as changing to a newer Debian base image). - `zodern/meteor:slim` Coming soon. Is a smaller image without node or npm pre-installed. During ONBUILD or when starting the app, it will install the correct version. +### Breaking changes in v2 + +Version 2 changed the base image from Debian 11 (bullseye) to Debian 13 (trixie). This is needed to support the uws DDP transport in Meteor 3.5. Old Meteor versions are still compatible. If the new base image causes problems for your app, you can use `zodern/meteor:1` or `zodern/meteor:1-root`. + ## How To Use ### Permissions From dbaa3b8743857477f8a6d1c9bfebf5dc46f09229 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 13 Jul 2026 17:36:16 -0500 Subject: [PATCH 3/4] Fix versions in readme --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 4b8517d..8dc3ede 100644 --- a/readme.md +++ b/readme.md @@ -19,9 +19,9 @@ Docker image to run Meteor apps. - `zodern/meteor:` or `zodern/meteor:-root` (for example, `zodern/meteor:1`) Use the latest minor or patch version, without any breaking changes from a new major version (such as changing to a newer Debian base image). - `zodern/meteor:slim` Coming soon. Is a smaller image without node or npm pre-installed. During ONBUILD or when starting the app, it will install the correct version. -### Breaking changes in v2 +### Breaking changes in v1 -Version 2 changed the base image from Debian 11 (bullseye) to Debian 13 (trixie). This is needed to support the uws DDP transport in Meteor 3.5. Old Meteor versions are still compatible. If the new base image causes problems for your app, you can use `zodern/meteor:1` or `zodern/meteor:1-root`. +Version 1 changed the base image from Debian 11 (bullseye) to Debian 13 (trixie). This is needed to support the uws DDP transport in Meteor 3.5. Old Meteor versions are still compatible. If the new base image causes problems for your app, you can use `zodern/meteor:0` or `zodern/meteor:0-root`. ## How To Use From 96dbc7d7b447579449f9c69bba95bb586dd23819 Mon Sep 17 00:00:00 2001 From: zodern Date: Mon, 13 Jul 2026 17:38:22 -0500 Subject: [PATCH 4/4] docs: add link to docker image --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8dc3ede..4aa9747 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ zodern/meteor Docker Image === -![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/zodern/meteor-docker/test-publish.yaml?branch-master&style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/zodern/meteor?style=flat-square) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/zodern/meteor-docker/test-publish.yaml?branch-master&style=flat-square) [![Docker Pulls](https://img.shields.io/docker/pulls/zodern/meteor?style=flat-square)](https://hub.docker.com/r/zodern/meteor) Docker image to run Meteor apps.