better
This commit is contained in:
parent
e4874697bc
commit
697d7a7145
17
Dockerfile
17
Dockerfile
@ -1,13 +1,24 @@
|
|||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS deps
|
||||||
|
|
||||||
WORKDIR /app
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
RUN go build .
|
RUN go build .
|
||||||
|
|
||||||
RUN ls /app
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
Loading…
Reference in New Issue
Block a user