Skip to content

Commit

Permalink
add nc to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmehrdad authored Jan 27, 2025
1 parent 6052a20 commit 0ab62d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 0ab62d0

Please sign in to comment.