From ca8252fb18515e59e821674111d9c6516eb3b2db Mon Sep 17 00:00:00 2001 From: Shen Yuan Date: Thu, 27 Nov 2025 02:58:04 -0500 Subject: [PATCH] Add Dockerfile --- Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7cd054e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Build stage +FROM golang:1.25-alpine AS builder + +RUN apk add --no-cache make + +WORKDIR /app + +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . . + +RUN make build + +# Runtime stage +FROM alpine:latest + +RUN apk --no-cache add ca-certificates + +WORKDIR /root/ + +COPY --from=builder /app/srs-proxy . + +CMD ["./srs-proxy"] \ No newline at end of file