Files
proxy-platform/deployments/Dockerfile.agent
T

29 lines
524 B
Docker

# 节点 Agent Dockerfile
FROM golang:1.21-alpine AS builder
WORKDIR /app
RUN apk add --no-cache git
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /agent ./cmd/agent
FROM alpine:latest
WORKDIR /app
RUN apk --no-cache add ca-certificates tzdata curl bash
# 安装 Cloudflare WARP
RUN curl -fsSL https://pkg.cloudflareclient.com/install.sh | bash
COPY --from=builder /agent /app/agent
COPY --from=builder /app/configs /app/configs
EXPOSE 1080
ENTRYPOINT ["/app/agent"]