make pond/Dockerfile use build stages (#427)

This commit is contained in:
Atul Bhosale 2018-09-15 02:09:30 +05:30 committed by Jess Frazelle
parent 3bfafa2f4c
commit 6ac299d472

View File

@ -1,4 +1,4 @@
FROM debian:buster-slim FROM debian:buster-slim as builder
LABEL maintainer "Jessie Frazelle <jess@linux.com>" LABEL maintainer "Jessie Frazelle <jess@linux.com>"
ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV PATH /go/bin:/usr/local/go/bin:$PATH
@ -42,4 +42,6 @@ RUN useradd --create-home --home-dir $HOME pond \
WORKDIR $HOME WORKDIR $HOME
USER pond USER pond
COPY --from=builder /usr/bin/pond-client /usr/bin/pond-client
COPY --from=builder /usr/bin/pond-server /usr/bin/pond-server
CMD [ "pond-client", "-cli" ] CMD [ "pond-client", "-cli" ]