File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 2424 for GOOS in linux; do
2525 for GOARCH in amd64 arm64; do
2626 export GOOS GOARCH
27- CGO_ENABLED=0 go build -v -a -tags netgo -ldflags="-extldflags '-static' -s -w $versionflags" -o build/osctl -${GOOS}-${GOARCH} cmd/main.go
27+ CGO_ENABLED=0 go build -v -a -tags netgo -ldflags="-extldflags '-static' -s -w $versionflags" -o build/wg -${GOOS}-${GOARCH} cmd/main.go
2828 done
2929 done
3030 cd build; sha256sum * > sha256sums.txt
Original file line number Diff line number Diff line change 1+ FROM golang:1.25-bookworm AS builder
2+
3+ ARG versionflags
4+
5+ WORKDIR /app
6+
7+ RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
8+
9+ COPY go.mod go.sum ./
10+ RUN go mod download
11+
12+ COPY . .
13+
14+ RUN CGO_ENABLED=0 go build -v -a -tags netgo -ldflags="-extldflags '-static' -s -w $versionflags" -o wg cmd/main.go
15+
16+ FROM debian:bookworm-slim
17+
18+ WORKDIR /app
19+
20+ ENV DEBIAN_FRONTEND=noninteractive
21+
22+ RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
23+ ca-certificates \
24+ curl \
25+ wget \
26+ dnsutils \
27+ iputils-ping \
28+ vim \
29+ nano \
30+ jq \
31+ lsof \
32+ net-tools \
33+ procps \
34+ tzdata \
35+ traceroute \
36+ mtr-tiny \
37+ && rm -rf /var/lib/apt/lists/*
38+
39+ COPY --from=builder /app/wg /app/wg
40+
41+ RUN chmod +x /app/wg
42+
43+ ENV PATH="/app:${PATH}"
You can’t perform that action at this time.
0 commit comments