Add GOOS argument to Dockerfiles for build environment configuration

This commit is contained in:
Cédric Verstraeten
2025-09-12 12:33:11 +02:00
parent e715575f20
commit c114b3da5b
2 changed files with 6 additions and 0 deletions

View File

@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
##################
# Build Machinery
ARG GOOS=linux
ENV GOOS=${GOOS}
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
go mod download && \
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \

View File

@@ -32,6 +32,9 @@ RUN cat /go/src/github.com/kerberos-io/agent/machinery/version
##################
# Build Machinery
ARG GOOS=linux
ENV GOOS=${GOOS}
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
go mod download && \
go build -tags timetzdata,netgo,osusergo --ldflags '-s -w -extldflags "-static -latomic"' main.go && \