mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 05:41:12 +00:00
c28f7cb29f
Initial part of #435
17 lines
450 B
Docker
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
|