Skip to content

Commit

Permalink
use a volume to cache go builds (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoroka authored Oct 5, 2021
1 parent c4ba310 commit 1f8f0fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG TARGETARCH
ARG BUILDVERSION=0.0.0-development
WORKDIR /go/src/github.com/infrahq/infra
COPY . .
VOLUME ["/root/.cache/go-build", "/go/pkg/mod"]
RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH CC=$TARGETARCH-linux-gnu-gcc go build -ldflags '-s -w -X github.com/infrahq/infra/internal.Version='"$BUILDVERSION"' -linkmode external -w -extldflags "-static"' .

FROM alpine
Expand Down

0 comments on commit 1f8f0fe

Please sign in to comment.