mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-27 05:54:08 +00:00
Dockerfiles for the two RLP utilities + GH workflow calling the shared hanzoai/.github docker-build@main workflow. amd64-only, lux-build-linux-amd64 runner pool per the cross-org isolation rule. Consumed by the lux-operator ExportSchedules CronJob (#69) and the TenantImports Job (#122). Both default to the in-cluster MinIO endpoint at http://s3.lux-system.svc.cluster.local:9000. Pre-existing modifications in builder/, configs/configs.go, pkg/genesis/{config,networks,types,cert_policy}.go intentionally left untouched per CTO commit-by-name discipline.
34 lines
1.0 KiB
Docker
34 lines
1.0 KiB
Docker
# Dockerfile for the rlp-export CronJob image. Symmetric with the
|
|
# rlp-import image — both share the same minimal runtime (BusyBox
|
|
# coreutils + the static Go binary).
|
|
#
|
|
# Build:
|
|
# docker build -f Dockerfile.rlp-export -t ghcr.io/luxfi/rlp-export:vX.Y.Z .
|
|
#
|
|
# Run (manual):
|
|
# docker run --rm -v $PWD/data:/data ghcr.io/luxfi/rlp-export:latest \
|
|
# --chain=C --output-file=/data/c-chain.rlp \
|
|
# --luxd-rpc=http://luxd:9630
|
|
#
|
|
# Reusable across the operator's CronJob template — the entrypoint is
|
|
# the static binary; the CronJob template wraps it in a /bin/sh -c
|
|
# script that injects a per-run timestamp.
|
|
FROM golang:1.26-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
ARG TARGETOS=linux
|
|
ARG TARGETARCH=amd64
|
|
ENV CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH}
|
|
RUN go build -trimpath -ldflags="-s -w" \
|
|
-o /out/rlp-export \
|
|
./cmd/rlp-export
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
COPY --from=builder /out/rlp-export /usr/local/bin/rlp-export
|
|
ENTRYPOINT ["/usr/local/bin/rlp-export"]
|