woodpecker/cmd/drone-build/Dockerfile.alpine
2015-08-09 15:36:25 -07:00

25 lines
753 B
Docker

# Docker image for the Drone build runner
#
# cd $GOPATH/src/github.com/drone/drone
# docker build --file=cmd/drone-build/Dockerfile.alpine --rm=true -t drone/drone-build .
FROM alpine:3.2
ENV GOROOT=/usr/lib/go \
GOPATH=/gopath \
GOBIN=/gopath/bin \
CGO_ENABLED=0 \
PATH=$PATH:$GOROOT/bin:$GOPATH/bin
WORKDIR /gopath/src/github.com/drone/drone
ADD . /gopath/src/github.com/drone/drone
RUN apk add -U go ca-certificates && \
cd cmd/drone-build && \
go build -a -tags netgo && \
apk del go && \
mv drone-build /bin/drone-build && \
rm -rf /gopath && \
rm -rf /var/cache/apk/*
ENTRYPOINT ["/bin/drone-build"]