add Dockerfile and build script

This commit is contained in:
2021-12-20 21:43:20 +00:00
parent 65d6fbe457
commit 12c3b5f784
3 changed files with 41 additions and 10 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM docker.io/library/golang:1.17-alpine3.14 as build
RUN apk --no-cache add make build-base git
ARG GONOSUMDB
ARG GOPROXY
ARG GOBIN=/opt/bin
ARG RELEASE="${RELEASE:-undefined}"
WORKDIR /build
ADD . .
RUN STATIC=true make install
FROM scratch
COPY --from=build /opt/bin/goget /