Add Telebit client wrapper
This commit is contained in:
21
Dockerfile.client
Normal file
21
Dockerfile.client
Normal 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/ /
|
||||
Reference in New Issue
Block a user