mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +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.
32 lines
788 B
Docker
32 lines
788 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/relay/config.Version=$VERSION'" -o /build/bin/openflare-relay ./cmd/relay/main.go
|
|
|
|
# Final runtime image
|
|
FROM fatedier/frps:v0.69.0
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy openflare-relay binary
|
|
COPY --from=builder /build/bin/openflare-relay ./openflare-relay
|
|
|
|
VOLUME ["/app/data"]
|
|
|
|
ENV OPENFLARE_FRPS_PATH=/usr/bin/frps
|
|
ENV OPENFLARE_DATA_DIR=/app/data
|
|
|
|
ENTRYPOINT ["/app/openflare-relay"]
|