25 lines
753 B
Text
25 lines
753 B
Text
# 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"]
|