Add Telebit client wrapper

This commit is contained in:
Elias Renman
2026-06-26 11:42:14 +02:00
parent e3d1049fd7
commit f0545ce3a3
3 changed files with 412 additions and 0 deletions

21
Dockerfile.client Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:1.24-alpine AS builder
ARG TELEBIT_REF=master
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN apk add --no-cache git
WORKDIR /src
RUN git clone --depth 1 --branch "${TELEBIT_REF}" https://github.com/therootcompany/telebit.git .
RUN go generate -mod=vendor ./...
# The upstream vendored x/net revision does not build on current macOS toolchains.
RUN go get golang.org/x/net@v0.40.0
RUN CGO_ENABLED=0 GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" go build -mod=mod -o /out/telebit ./cmd/telebit
RUN CGO_ENABLED=0 GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" go build -mod=mod -o /out/signjwt ./cmd/signjwt
FROM scratch AS export
COPY --from=builder /out/ /