File tree Expand file tree Collapse file tree 2 files changed +3
-46
lines changed Expand file tree Collapse file tree 2 files changed +3
-46
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,8 @@ ARG TARGETARCH
5
5
6
6
WORKDIR /workspace
7
7
8
- # Install build dependencies for static ZMQ
9
8
RUN apt-get update && apt-get install -y \
10
- build-essential cmake git wget pkg-config \
11
- libtool autoconf automake
12
-
13
- # Build static libzmq
14
- COPY scripts/build-static-zmq.sh /tmp/
15
- RUN chmod +x /tmp/build-static-zmq.sh && /tmp/build-static-zmq.sh
9
+ libkrb5-dev libzmq3-dev
16
10
17
11
# Copy the Go Modules manifests
18
12
COPY go.mod go.mod
@@ -26,14 +20,9 @@ COPY cmd/ cmd/
26
20
COPY api/ api/
27
21
COPY pkg/ pkg/
28
22
29
- # Build with static linking
30
- ENV CGO_ENABLED=1
31
- ENV CGO_LDFLAGS="-L/usr/local/lib -lzmq -lsodium -lstdc++ -lpthread -lm -static"
32
- ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
33
-
34
- RUN GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
23
+ RUN GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} CGO_ENABLED=1 \
35
24
go build -tags zmq \
36
- -ldflags '-extldflags "-static "' \
25
+ -ldflags '-extldflags "-lzmq "' \
37
26
-a -o gateway-plugins cmd/plugins/main.go
38
27
39
28
# Use distroless as minimal base image to package the manager binary
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments