diff --git a/Dockerfile b/Dockerfile index 00cc99f..89207ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app COPY go.mod ./ COPY go.sum ./ -RUN go mod download +RUN --mount=type=cache,mode=0777,target=/go/pkg/mod go mod download all COPY ./pkg ./pkg COPY ./src ./src @@ -14,7 +14,7 @@ COPY ./templates ./templates COPY embed.go embed.go RUN go generate ./... -RUN CGO_ENABLED=0 go build -tags timetzdata -o /tstor ./cmd/tstor/main.go +RUN --mount=type=cache,mode=0777,target=/go/pkg/mod CGO_ENABLED=0 go build -tags timetzdata -o /tstor ./cmd/tstor/main.go FROM scratch