woodpecker/vendor/github.com/ryancurrah/gomodguard/Dockerfile
Lukas c28f7cb29f
Add golangci-lint (#502)
Initial part of #435
2021-11-14 21:01:54 +01:00

17 lines
450 B
Docker

ARG GO_VERSION=1.14.2
ARG ALPINE_VERSION=3.11
ARG gomodguard_VERSION=
# ---- Build container
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
WORKDIR /gomodguard
COPY . .
RUN apk add --no-cache git
RUN go build -o gomodguard cmd/gomodguard/main.go
# ---- App container
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION}
WORKDIR /
RUN apk --no-cache add ca-certificates
COPY --from=builder gomodguard/gomodguard /
ENTRYPOINT ./gomodguard