mirror of
https://github.com/luxfi/genesis.git
synced 2026-10-30 16:25:45 +00:00
ghcr.io/luxfi/rlp-export has never existed. The CronJob that is meant to
be mainnet's only C-Chain backup has referenced :latest since June and
every run died on ImagePullBackOff, because the image could not be built:
- Dockerfile.rlp-export ran `go build ./cmd/rlp-export` against the ROOT
module, but cmd/ is a nested module — the package is not in the root
module at all ("main module does not contain package ...").
- Falling back to the cmd module does not work either: cmd/go.mod carries
`replace github.com/luxfi/node => ../../node`, an out-of-tree path that
cannot exist inside a build context.
Both tools import nothing outside the standard library (checked: their
main.go and main_test.go are stdlib-only). So they get their own modules
and their Dockerfiles build from their own directory. No module download,
no network, no unresolvable replace.
Proven: `GOPROXY=off go build` and `go test` both pass for each tool.
Co-authored-by: Hanzo Dev <[email protected]>
24 lines
796 B
Docker
24 lines
796 B
Docker
# Dockerfile for the rlp-import image.
|
|
#
|
|
# Builds from cmd/rlp-import ALONE. That directory is its own stdlib-only Go
|
|
# module, so this build needs no module download and no network — and, unlike
|
|
# the previous version of this file, it does not try to build a package that
|
|
# lives outside the root module.
|
|
#
|
|
# Build:
|
|
# docker build -f Dockerfile.rlp-import -t ghcr.io/luxfi/rlp-import:vX.Y.Z .
|
|
FROM golang:1.26-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
COPY cmd/rlp-import/ ./
|
|
|
|
ARG TARGETOS=linux
|
|
ARG TARGETARCH=amd64
|
|
ENV CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH}
|
|
RUN go build -trimpath -ldflags="-s -w" -o /out/rlp-import .
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
COPY --from=builder /out/rlp-import /usr/local/bin/rlp-import
|
|
ENTRYPOINT ["/usr/local/bin/rlp-import"]
|