2023-02-07 14:14:14 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
RUN apk add openssh
|
|
|
|
|
2023-02-08 08:03:57 +00:00
|
|
|
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config && echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
|
2023-02-07 14:14:14 +00:00
|
|
|
|
|
|
|
RUN adduser -h /home/user -s /bin/sh -D user
|
|
|
|
|
|
|
|
# sounds insecure, which it is, but you're in a container and you're supposed to change it
|
|
|
|
RUN echo 'user:password' | chpasswd
|
|
|
|
|
|
|
|
COPY motd /
|
|
|
|
RUN rm /etc/motd && cat /motd >> /etc/motd
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
EXPOSE 22
|
|
|
|
COPY entrypoint.sh /
|