Created
May 6, 2019 20:37
-
-
Save mayli/fa6614e4edfb92bd7d1edc6f164c5e19 to your computer and use it in GitHub Desktop.
mosh static alpine docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
MAINTAINER Brett Randall <[email protected]> | |
# NOTE: openssh is only required for testing connection to built docker using the built mosh-server | |
RUN apk update \ | |
&& apk add alpine-sdk autoconf automake protobuf-dev ncurses ncurses-dev ncurses-static openssl-dev openssh | |
RUN apk add perl-doc | |
RUN git clone https://github.com/mobile-shell/mosh.git \ | |
&& cd mosh \ | |
&& ./autogen.sh \ | |
&& LDFLAGS="-static" ./configure --prefix=/usr \ | |
&& make \ | |
&& make install \ | |
&& ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa \ | |
&& ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa \ | |
&& adduser -D mosh \ | |
&& echo 'mosh:m0sh-st@t1c' | chpasswd | |
EXPOSE 22 | |
ENTRYPOINT /usr/sbin/sshd \ | |
&& sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment