From f6adcfa2a546fcdac8eb5d67b111c8cd570f3359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 24 Apr 2024 11:14:10 +0200 Subject: [PATCH] chore: include common CMD used across all libraries (#7) * chore: include common CMD used across all libraries * fix: proper CMD settings * fix: proper syntax * chore: support overriding user/password * fi: proper env syntax --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b5513ef..0b0c5a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,8 @@ FROM alpine:3.19.1 -RUN apk add --no-cache openssh && ssh-keygen -A && echo 'root:root' | chpasswd +RUN apk add --no-cache openssh && ssh-keygen -A + +ENV USERNAME="root" +ENV PASSWORD="root" + +ENTRYPOINT ["sh", "-c"] +CMD ["echo ${USERNAME}:${PASSWORD} | chpasswd && /usr/sbin/sshd -D -o PermitRootLogin=yes -o AddressFamily=inet -o GatewayPorts=yes -o AllowAgentForwarding=yes -o AllowTcpForwarding=yes -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostkeyAlgorithms=+ssh-rsa"]