From dc7d13b8530716689d49d39ca52390b4ee7effb4 Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:06:29 +1300 Subject: [PATCH] chore(Dockerfile): Simplify `testssl` user creation Create `testssl` user (_and group_) with no password (`-D`) and default their shell to bash (`-s`): - A group will implicitly be created with the same value as the user. `addgroup testssl` and `-G testssl` are not needed. - Gecos data (`-g "testssl user"`) doesn't appear relevant to the project to be required? The default gecos value (`Linux User,,,`) should be fine. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ccf505..53e8bd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,7 @@ RUN apk update && \ apk upgrade && \ apk add bash procps drill git coreutils libidn curl socat openssl xxd && \ rm -rf /var/cache/apk/* && \ - addgroup testssl && \ - adduser -G testssl -g "testssl user" -s /bin/bash -D testssl && \ + adduser -D -s /bin/bash testssl && \ ln -s /home/testssl/testssl.sh /usr/local/bin/ && \ mkdir -m 755 -p /home/testssl/etc /home/testssl/bin