Skip to content

Commit 301c2eb

Browse files
feat: add Dockerfile for Rabbit.go server build and deployment
- Create a multi-stage Dockerfile to build the Rabbit.go application using Go 1.24.0 on Alpine - Set up the application to run in a distroless environment for minimal footprint - Expose necessary ports for the tunnel server and API
1 parent e0f824f commit 301c2eb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

server/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM golang:1.24.0-alpine AS builder
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
RUN go build -ldflags="-s -w" -o rabbit.go main.go
8+
9+
FROM gcr.io/distroless/static-debian12:latest as runner
10+
11+
COPY --from=builder /app/rabbit.go /usr/local/bin/rabbit.go
12+
13+
# 9999 is the tunnel server port
14+
# 3422 is the API port (never expose this port to the internet)
15+
EXPOSE 9999 3422
16+
17+
ENTRYPOINT ["/usr/local/bin/rabbit.go", "server", "--bind", "0.0.0.0", "--port", "9999", "--api-port", "3422"]

0 commit comments

Comments
 (0)