File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,29 @@ FROM alpine:3.20
44ARG COMPONENT
55ARG TARGETARCH
66
7+ RUN if [ "$COMPONENT" = "geneve" ] || [ "$COMPONENT" = "wireguard" ] || [ "$COMPONENT" = "gateway" ]; then \
8+ set -x; \
9+ apk add --no-cache iproute2 nftables bash wireguard-tools tcpdump conntrack-tools curl iputils; \
10+ fi
11+
12+ RUN if [ "$COMPONENT" = "wireguard" ]; then \
13+ set -e; \
14+ apk add --no-cache git curl; \
15+ GO_VERSION=1.22.4; \
16+ curl -L https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz; \
17+ export PATH="/usr/local/go/bin:$PATH" ; \
18+ git clone https://git.zx2c4.com/wireguard-go; cd wireguard-go; git checkout f333402bd9cbe0f3eeb02507bd14e23d7d639280; \
19+ CGO_ENABLED=0 GOOS=linux GOARCH=$(go env GOARCH) /usr/local/go/bin/go build -ldflags="-s -w" -o /usr/bin/wireguard-go; \
20+ cd .. && rm -rf wireguard-go; \
21+ rm -rf /usr/local/go; \
22+ apk del git curl; \
23+ fi
24+
725# Copy the correct binary for the architecture
826COPY ./bin/${TARGETARCH}/${COMPONENT}_linux_${TARGETARCH} /usr/bin/${COMPONENT}
927RUN chmod +x /usr/bin/${COMPONENT}
1028RUN ln -s /usr/bin/${COMPONENT} /usr/bin/liqo-component
1129
12- RUN if [ "$COMPONENT" = "geneve" ] || [ "$COMPONENT" = "wireguard" ] || [ "$COMPONENT" = "gateway" ]; then \
13- apk add --no-cache iproute2 nftables bash wireguard-tools tcpdump conntrack-tools curl iputils; \
14- fi
15-
1630WORKDIR /workspace
1731
1832ENTRYPOINT ["/usr/bin/liqo-component" ]
You can’t perform that action at this time.
0 commit comments