fix: Propagate CGO_ENABLED environment variable to docker build (#724)
* fix: Add ability to statically compile binaries * propagate env var from github action * fix comment
This commit is contained in:
parent
1b03d78800
commit
f3d6d9d73e
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -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 }}"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user