woodpecker/cmd/drone-build/Dockerfile.alpine

26 lines
753 B
Docker
Raw Normal View History

2015-08-09 22:36:25 +00:00
# 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"]