Modify Dockerfile to add cache volumes (#500)

This commit is contained in:
Jacob Schuler
2025-12-22 22:00:05 -05:00
committed by GitHub
parent bd2a9dfda3
commit 0938276368
+5 -2
View File
@@ -3,10 +3,13 @@ FROM golang:1.25 AS builder
WORKDIR /build WORKDIR /build
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY . . COPY . .
RUN CGO_ENABLED=0 go build -buildvcs=false ./cmd/mc-router RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 go build -buildvcs=false ./cmd/mc-router
FROM alpine AS certs FROM alpine AS certs
RUN apk add -U \ RUN apk add -U \