drone-ssh/Dockerfile
Bo-Yi Wu 14fddbbba5 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>
2017-08-15 14:23:25 +08:00

15 lines
380 B
Docker

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 && \
apk add \
ca-certificates \
openssh-client && \
rm -rf /var/cache/apk/*
COPY --from=build-env /go/src/github.com/appleboy/drone-ssh/drone-ssh /bin
ENTRYPOINT ["/bin/drone-ssh"]