Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Disable cgo
Browse files Browse the repository at this point in the history
As part of the Go 1.20 release it seems like the default for `CGO_ENABLED` is no longer carried over from the tools. This leads to linking issues on systems that use different versions of glibc from what the base image uses. See golang/go#58550 for more details.

This change should fix cosmonic-labs#16
  • Loading branch information
deverton-godaddy committed Jul 6, 2023
1 parent e72670d commit 57cdb69
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 @@ -2,6 +2,7 @@ FROM golang:1.20 as builder
WORKDIR /netreap
COPY . /netreap
ARG VERSION
ENV CGO_ENABLED 0
RUN go build -ldflags "-s -w -X 'main.Version=$VERSION'"

FROM gcr.io/distroless/base-debian11
Expand Down

0 comments on commit 57cdb69

Please sign in to comment.