Skip to content

Instantly share code, notes, and snippets.

@goncalor
Last active April 18, 2019 18:03
Show Gist options
  • Save goncalor/be49f11fd931a7f0e7132bff69969f0a to your computer and use it in GitHub Desktop.
Save goncalor/be49f11fd931a7f0e7132bff69969f0a to your computer and use it in GitHub Desktop.
FROM alpine:latest
RUN apk add --no-cache openssh-server #openssh-sftp-server
RUN ssh-keygen -A
RUN adduser -h /home/user -D user
RUN pw=$(head -c 12 /dev/urandom | base64); echo "user:$pw" | chpasswd; echo $pw
EXPOSE 22
CMD /usr/sbin/sshd -D && sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment