From 6e215a9225b90758711e681c11aeaf1cbfafab4e Mon Sep 17 00:00:00 2001 From: Reese Norris Date: Tue, 22 Oct 2024 12:10:38 -0700 Subject: [PATCH] remove cache layers from Dockerfile --- Dockerfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b87d02a..fc524fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,17 +11,8 @@ RUN apk update && apk add ca-certificates && \ # Build openfsd FROM golang:1.23.2-bookworm AS build -# Precompile the entire go standard library into the first Docker cache layer -RUN CGO_ENABLED=0 GOOS=linux go install -v -a std - WORKDIR /go/src/openfsd -# Download and precompile all third party libraries -COPY go.mod . -COPY go.sum . -RUN go mod download -x -RUN go list -m all | tail -n +2 | cut -f 1 -d " " | awk 'NF{print $0 "/..."}' | CGO_ENABLED=0 GOOS=linux xargs -n1 go build -v; echo done - # Add the sources COPY . .