mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-23 02:17:56 +00:00
feat: docker cluster demo (frps+3 nodes, M6 auto binary pull, tunnel e2e) + fix SelfAddr/W4F_HOST/bootstrap retry, -frpc flag
This commit is contained in:
21
deploy/Dockerfile
Normal file
21
deploy/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
# Build the Go binary with embedded web UI + demo backend.
|
||||
FROM golang:1.25.0 AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum vendor ./
|
||||
COPY cmd ./cmd
|
||||
COPY internal ./internal
|
||||
# Vendored deps => fully offline build.
|
||||
RUN CGO_ENABLED=0 go build -mod=vendor -trimpath -ldflags="-s -w" -o /out/webui4frpc ./cmd/webui4frpc
|
||||
|
||||
# Static demo backend (tiny HTTP server).
|
||||
COPY deploy/demo-backend ./demo-backend
|
||||
RUN CGO_ENABLED=0 go build -mod=vendor -trimpath -ldflags="-s -w" -o /out/backend ./demo-backend
|
||||
|
||||
# Runtime image: no frp binaries baked in (mounted via compose volume to keep
|
||||
# layers small and build fast); static Go only.
|
||||
FROM debian:bookworm-slim
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/webui4frpc /app/webui4frpc
|
||||
COPY --from=build /out/backend /app/backend
|
||||
EXPOSE 7500 7000 7400 8080
|
||||
ENTRYPOINT ["/app/webui4frpc"]
|
||||
Reference in New Issue
Block a user