diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f0c8a6ba6..909da7c54 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,3 +33,5 @@ jobs: push: false tags: pgweb:latest platforms: linux/amd64,linux/arm64,linux/arm/v7 + build-args: | + "CGO_ENABLED=${{ env.CGO_ENABLED }}" diff --git a/Dockerfile b/Dockerfile index 408e81da3..bb13e1fc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,10 @@ # ------------------------------------------------------------------------------ FROM golang:1.22-bullseye AS build +# Set default build argument for CGO_ENABLED +ARG CGO_ENABLED=0 +ENV CGO_ENABLED ${CGO_ENABLED} + WORKDIR /build RUN git config --global --add safe.directory /build