Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Based on from https://github.com/javabrett/mosh/blob/docker/dockerfiles/Dockerfile.alpine
FROM alpine

ARG MOSH_VERSION=1.3.2
ARG MOSH_VERSION=1.4.0
ENV MOSH=mosh-${MOSH_VERSION}

RUN apk update && \
apk --no-cache add \
git \
autoconf \
automake \
build-base \
curl \
perl \
gzip \
clang \
make \
ncurses-dev \
ncurses-static \
openssh-client \
Expand All @@ -19,15 +21,19 @@ RUN apk update && \
protobuf-dev \
zlib-static \
zlib-dev \
abseil-cpp-dev \
libutempter-dev

# Build as static file
RUN git clone --depth=1 --branch mosh-${MOSH_VERSION} https://github.com/mobile-shell/mosh.git && \
cd mosh && \
./autogen.sh && LDFLAGS=-static ./configure && make
ENV CPPFLAGS=-std=c++17
ENV LDFLAGS=-static
RUN curl -sLO https://github.com/mobile-shell/mosh/releases/download/mosh-${MOSH_VERSION}/${MOSH}.tar.gz && \
tar xvfz ${MOSH}.tar.gz && \
cd ${MOSH} && \
./configure && make


FROM scratch

COPY --from=0 /mosh/src/frontend/mosh-server /
COPY --from=0 /mosh/src/frontend/mosh-client /
#
# FROM scratch
#
# COPY --from=0 /mosh/src/frontend/mosh-server /
# COPY --from=0 /mosh/src/frontend/mosh-client /