Make final docker image smaller

This commit is contained in:
ant 2019-03-23 18:04:02 +00:00
parent 94cf07e8ba
commit 4ffc65b3eb

View File

@ -1,8 +1,15 @@
FROM gliderlabs/alpine:3.4 FROM alpine:3.9 as builder
RUN \ RUN apk add --no-cache build-base
apk add --no-cache make gcc git libc-dev && \ ADD endlessh.c Makefile /
git clone https://github.com/skeeto/endlessh && \ RUN make
cd endlessh && \
make
FROM alpine:3.9
COPY --from=builder /endlessh /
EXPOSE 2222/tcp EXPOSE 2222/tcp
ENTRYPOINT /endlessh/endlessh
ENTRYPOINT ["/endlessh"]
CMD ["-v"]