feat: add multiple stage build for docker. (#96)

* feat: add multiple stage build for docker.

* remove unused target

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-08-15 14:23:25 +08:00
committed by GitHub
parent 5fbd22f265
commit 14fddbbba5
3 changed files with 6 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
FROM appleboy/golang-testing AS build-env
ADD . /go/src/github.com/appleboy/drone-ssh
RUN cd /go/src/github.com/appleboy/drone-ssh && make static_build
FROM alpine:3.4
RUN apk update && \
@@ -6,5 +10,5 @@ RUN apk update && \
openssh-client && \
rm -rf /var/cache/apk/*
ADD drone-ssh /bin/
COPY --from=build-env /go/src/github.com/appleboy/drone-ssh/drone-ssh /bin
ENTRYPOINT ["/bin/drone-ssh"]