summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: f775bc5b3783022ba0baddad6ae4ea763b29cb2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
FROM alpine
RUN apk add --update git openssh \
&& rm  -rf /tmp/* /var/cache/apk/*
RUN ssh-keygen -A
# creates locked password
RUN adduser -D -u 500 ist
# unlock and disable password
RUN passwd -ud ist
RUN echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
EXPOSE 22
# mount server .ssh/authorized keys as volume in start command
CMD ["/usr/sbin/sshd","-D"]