FalseSSH/Dockerfile

17 lines
445 B
Docker

FROM alpine:latest
RUN apk add openssh
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config && echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
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 /