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
RUN \
apk add --no-cache make gcc git libc-dev && \
git clone https://github.com/skeeto/endlessh && \
cd endlessh && \
make
FROM alpine:3.9 as builder
RUN apk add --no-cache build-base
ADD endlessh.c Makefile /
RUN make
FROM alpine:3.9
COPY --from=builder /endlessh /
EXPOSE 2222/tcp
ENTRYPOINT /endlessh/endlessh
ENTRYPOINT ["/endlessh"]
CMD ["-v"]