From 286bc150db08edce0f0a57a9bae560a650336c47 Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 5 May 2025 13:23:06 +0200 Subject: [PATCH] rename file --- Dockerfile-alpine | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile-alpine diff --git a/Dockerfile-alpine b/Dockerfile-alpine new file mode 100644 index 0000000..5f1a848 --- /dev/null +++ b/Dockerfile-alpine @@ -0,0 +1,22 @@ +FROM alpine:3.21 AS base-alpine +RUN apk add --no-cache bash procps drill coreutils libidn curl socat openssl xxd \ + && addgroup testssl \ + && adduser -G testssl -g "testssl user" -s /bin/bash -D testssl \ + && ln -s /home/testssl/testssl.sh /usr/local/bin/testssl.sh + +USER testssl +ENTRYPOINT ["testssl.sh"] +CMD ["--help"] + +# Final image stage (add testssl.sh project files) +# Choose either one as the final stage (defaults to last stage, `dist-git`) + +# 30MB Image (Local repo copy from build context, uses `.dockerignore`): +FROM base-alpine AS dist-local +COPY --chown=testssl:testssl . /home/testssl/ + +# 38MB Image (Remote repo clone, cannot filter content through `.dockerignore`): +FROM base-alpine AS dist-git +ARG GIT_URL=https://github.com/testssl/testssl.sh.git +ARG GIT_BRANCH +ADD --chown=testssl:testssl ${GIT_URL}#${GIT_BRANCH?branch-required} /home/testssl