This commit is contained in:
mr 2025-02-18 08:26:05 +01:00
parent e4874697bc
commit 697d7a7145

View File

@ -1,13 +1,24 @@
FROM golang:alpine AS builder
FROM golang:alpine AS deps
WORKDIR /app
COPY go.mod go.sum ./
RUN sed -i '/replace/d' go.mod
RUN go mod download -x
#----------------------------------------------------------------------------------------------
FROM golang:alpine AS builder
LABEL maintainer="IRT PFN"
ENV DOCKER_ENVIRONMENT=true
WORKDIR /app
COPY --from=deps /go/pkg /go/pkg
COPY --from=deps /app/go.mod /app/go.sum ./
COPY . .
RUN go build .
RUN ls /app
FROM scratch
WORKDIR /app