From 0ab62d0b4dc1986cc1a4a6e6c89740333e8b814a Mon Sep 17 00:00:00 2001 From: Mehrdad Amini Date: Tue, 28 Jan 2025 02:23:08 +0300 Subject: [PATCH] add nc to dockerfile --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 12dba4f..2ceaff8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,11 +17,16 @@ RUN go mod download # Build the application RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o proxy-server . +# Intermediate stage to include nc +FROM alpine:latest AS nc-builder +RUN apk add --no-cache netcat-openbsd + # Final stage FROM scratch WORKDIR /app COPY --from=builder /build/proxy-server . COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=nc-builder /bin/nc /bin/nc EXPOSE 1080 CMD ["./proxy-server"] \ No newline at end of file