mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
add CGO_ENABLED=0 back to docker images / goreleaser config
This commit is contained in:
@@ -10,8 +10,8 @@ builds:
|
||||
- id: beszel
|
||||
binary: beszel
|
||||
main: cmd/hub/hub.go
|
||||
# env:
|
||||
# - CGO_ENABLED=0
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
@@ -23,8 +23,8 @@ builds:
|
||||
- id: beszel-agent
|
||||
binary: beszel-agent
|
||||
main: cmd/agent/agent.go
|
||||
# env:
|
||||
# - CGO_ENABLED=0
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
@@ -84,8 +84,9 @@ nfpms:
|
||||
- beszel-agent
|
||||
formats:
|
||||
- deb
|
||||
dependencies:
|
||||
- libc6
|
||||
# don't think this is needed with CGO_ENABLED=0
|
||||
# dependencies:
|
||||
# - libc6
|
||||
contents:
|
||||
- src: ../supplemental/debian/beszel-agent.service
|
||||
dst: lib/systemd/system/beszel-agent.service
|
||||
|
@@ -10,7 +10,7 @@ COPY internal ./internal
|
||||
|
||||
# Build
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /agent ./cmd/agent
|
||||
RUN CGO_ENABLED=0 GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /agent ./cmd/agent
|
||||
|
||||
# ? -------------------------
|
||||
FROM scratch
|
||||
|
@@ -22,7 +22,7 @@ RUN update-ca-certificates
|
||||
|
||||
# Build
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /beszel ./cmd/hub
|
||||
RUN CGO_ENABLED=0 GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /beszel ./cmd/hub
|
||||
|
||||
# ? -------------------------
|
||||
FROM scratch
|
||||
|
Reference in New Issue
Block a user