From d70e58ae412b982d5937d5dd35fbea491e866ef6 Mon Sep 17 00:00:00 2001 From: viettranx Date: Sun, 8 Mar 2026 16:58:43 +0700 Subject: [PATCH] feat: add conditional Python 3 and pip installation via `ENABLE_PYTHON` build argument. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e2654091..466747e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,12 +37,16 @@ RUN set -eux; \ FROM alpine:3.22 ARG ENABLE_SANDBOX=false +ARG ENABLE_PYTHON=false -# Install ca-certificates + wget (healthcheck) + optionally docker-cli (sandbox) +# Install ca-certificates + wget (healthcheck) + optionally docker-cli (sandbox) + python3 RUN set -eux; \ apk add --no-cache ca-certificates wget; \ if [ "$ENABLE_SANDBOX" = "true" ]; then \ apk add --no-cache docker-cli; \ + fi; \ + if [ "$ENABLE_PYTHON" = "true" ]; then \ + apk add --no-cache python3 py3-pip; \ fi # Non-root user