mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 05:56:38 +08:00
63cd906cfc
- Merge all files inside openflare-server to the repository root directory. - Relocate agent, relay, and flared subprojects from internal/ to internal/apps/. - Combine docker-compose files and update build context paths to root. - Update GitHub workflows and Dockerfiles to refer to new directories and package names. - Rewrite Go package imports across all files. - Resolve database renew test race condition and clean up docs.
31 lines
712 B
Docker
31 lines
712 B
Docker
# syntax=docker/dockerfile:1.7
|
|
ARG VERSION=dev
|
|
|
|
FROM golang:1.25-alpine AS builder
|
|
|
|
ARG VERSION
|
|
|
|
WORKDIR /build
|
|
COPY go.mod go.sum ./
|
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
go mod download
|
|
|
|
COPY . .
|
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=cache,target=/root/.cache/go-build \
|
|
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w -X 'github.com/Rain-kl/Wavelet/internal/apps/flared/config.Version=$VERSION'" -o flared ./cmd/flared/main.go
|
|
|
|
# Final runtime image
|
|
FROM fatedier/frpc:v0.69.0
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy openflared binary
|
|
COPY --from=builder /build/flared .
|
|
|
|
ENV OPENFLARE_DATA_DIR=/app/data
|
|
ENV OPENFLARE_FRPC_PATH=/usr/bin/frpc
|
|
|
|
ENTRYPOINT ["/app/flared"]
|
|
CMD []
|