From 6e03890181963598780b6021719887b99bb90dd4 Mon Sep 17 00:00:00 2001 From: Chingis S Date: Wed, 23 Sep 2026 09:34:59 +0400 Subject: [PATCH 1/2] Add development tools and image smoke checks Add ripgrep and jq to development variants and run a smoke check for shell, Git, SSH, editor tools and a writable non-root home. Keep ordinary runtime dependencies unchanged. --- Dockerfile | 1 + tests/development-tools.sh | 14 ++++++++++++++ tests/run.sh | 3 +++ 3 files changed, 18 insertions(+) create mode 100644 tests/development-tools.sh diff --git a/Dockerfile b/Dockerfile index 67c585a..b44aeb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,6 +97,7 @@ RUN set -xe; \ mv /tmp/redis-cli /usr/bin; \ \ if [[ -n "${PYTHON_DEV}" ]]; then \ + apk add --no-cache ripgrep jq; \ apk add --update --no-cache -t .wodby-python-build-deps \ build-base \ gcc \ diff --git a/tests/development-tools.sh b/tests/development-tools.sh new file mode 100644 index 0000000..c1951c4 --- /dev/null +++ b/tests/development-tools.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Execute inside the image, bypassing application startup. +set -eu +[ -n "${PYTHON_DEV:-}" ] || exit 0 +for tool in sh bash git curl rg jq nano ssh ssh-keygen; do + command -v "$tool" >/dev/null +done +test -x /usr/sbin/sshd +test "$(id -u)" -ne 0 +test -w "$HOME" +identity=$(mktemp -d) +trap 'rm -rf "$identity"' EXIT +ssh-keygen -q -t ed25519 -N '' -f "$identity/host" +sudo -n /usr/sbin/sshd -t -f /dev/null -h "$identity/host" diff --git a/tests/run.sh b/tests/run.sh index 1b3d753..fb94ab1 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -2,6 +2,9 @@ set -e +# Validate the development tool contract before application integration tests. +docker run --rm --network none --entrypoint /bin/sh -v "$PWD/development-tools.sh:/tmp/development-tools.sh:ro" "${PYTHON_IMAGE}" /tmp/development-tools.sh + if [[ -n "${DEBUG}" ]]; then set -x fi From 65ec89c81c8b6ea90e3f1ea08df92e018bd5517d Mon Sep 17 00:00:00 2001 From: Chingis S Date: Wed, 23 Sep 2026 09:41:40 +0400 Subject: [PATCH 2/2] Use the image test harness variable for tool checks Pass the IMAGE value supplied by make test to the development smoke container. This keeps the check aligned with the current build matrix on both architectures. --- tests/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index fb94ab1..4eb352e 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -3,7 +3,7 @@ set -e # Validate the development tool contract before application integration tests. -docker run --rm --network none --entrypoint /bin/sh -v "$PWD/development-tools.sh:/tmp/development-tools.sh:ro" "${PYTHON_IMAGE}" /tmp/development-tools.sh +docker run --rm --network none --entrypoint /bin/sh -v "$PWD/development-tools.sh:/tmp/development-tools.sh:ro" "${IMAGE}" /tmp/development-tools.sh if [[ -n "${DEBUG}" ]]; then set -x