mirror of
https://github.com/drone-plugins/drone-npm.git
synced 2026-06-04 18:23:52 +08:00
26 lines
799 B
Docker
26 lines
799 B
Docker
# Docker image for the Drone NPM plugin
|
|
#
|
|
# cd $GOPATH/src/github.com/drone-plugins/drone-npm
|
|
# docker build --file=Dockerfile.alpine --rm=true -t plugins/drone-npm .
|
|
|
|
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-plugins/drone-npm
|
|
ADD . /gopath/src/github.com/drone-plugins/drone-npm
|
|
|
|
RUN apk add -U go ca-certificates git nodejs && \
|
|
go get && \
|
|
go build -a -tags netgo && \
|
|
apk del go && \
|
|
mv drone-npm /bin/drone-npm && \
|
|
rm -rf /gopath && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
ENTRYPOINT ["/bin/drone-npm"]
|