-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 753 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM golang:1.26.2 AS builder
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -o /nylon .
FROM scratch
# Copy binary from builder
COPY --from=builder /nylon /usr/local/bin/nylon
WORKDIR /app/config
ENTRYPOINT ["/usr/local/bin/nylon", "run"]
FROM ubuntu:latest AS debug
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
iputils-ping \
iperf3 \
curl \
iproute2 \
wireguard-tools \
net-tools \
tcpdump \
dnsutils \
netcat-openbsd \
python3 && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /nylon /usr/local/bin/nylon
WORKDIR /app/config
ENTRYPOINT ["/usr/local/bin/nylon", "run", "-v", "-w", "--dbg-trace-tc"]