17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add openssh
|
||||
|
||||
RUN echo 'PasswordAuthentication 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 /
|
||||
Reference in New Issue
Block a user