Skip to content

Commit 0ab62d0

Browse files
authored
add nc to dockerfile
1 parent 6052a20 commit 0ab62d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ RUN go mod download
1717
# Build the application
1818
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o proxy-server .
1919

20+
# Intermediate stage to include nc
21+
FROM alpine:latest AS nc-builder
22+
RUN apk add --no-cache netcat-openbsd
23+
2024
# Final stage
2125
FROM scratch
2226
WORKDIR /app
2327
COPY --from=builder /build/proxy-server .
2428
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
29+
COPY --from=nc-builder /bin/nc /bin/nc
2530

2631
EXPOSE 1080
2732
CMD ["./proxy-server"]

0 commit comments

Comments
 (0)