CI/CD / render (push) Failing after 0s
One toolchain across the estate. The tree carried 1.26.0, .1, .3, .4 and .5 at once, so which compiler built a binary depended on which repo it came from. Co-authored-by: Hanzo Dev <[email protected]>
69 lines
2.5 KiB
Docker
69 lines
2.5 KiB
Docker
# Multi-stage build for Lux node — installs from published module tags.
|
|
# No local source checkout required.
|
|
#
|
|
# Build:
|
|
# docker build -f docker/Dockerfile.node \
|
|
# --build-arg NODE_VERSION=v1.23.5 \
|
|
# --build-arg EVM_VERSION=v0.8.35 .
|
|
#
|
|
# The builder fetches the node binary via `go install` and downloads the
|
|
# EVM plugin from GitHub Releases. The runtime image is minimal Debian.
|
|
|
|
ARG GO_VERSION=1.26.8
|
|
|
|
# ── Builder ──────────────────────────────────────────────────────────
|
|
FROM golang:${GO_VERSION}-bookworm AS builder
|
|
ENV GOTOOLCHAIN=auto
|
|
|
|
ARG NODE_VERSION=v1.23.5
|
|
|
|
ENV GOPRIVATE=github.com/lux-private/*
|
|
ENV CGO_ENABLED=0
|
|
|
|
RUN go install github.com/luxfi/node/main@${NODE_VERSION}
|
|
|
|
# Binary lands in /go/bin/main — rename to luxd
|
|
RUN mv /go/bin/main /go/bin/luxd
|
|
|
|
# ── EVM plugin ───────────────────────────────────────────────────────
|
|
FROM curlimages/curl:latest AS plugin
|
|
|
|
ARG EVM_VERSION=v0.8.35
|
|
|
|
RUN curl -sL \
|
|
"https://github.com/luxfi/evm/releases/download/${EVM_VERSION}/evm-plugin-linux-amd64" \
|
|
-o /tmp/evm-plugin && chmod +x /tmp/evm-plugin
|
|
|
|
# ── Runtime ──────────────────────────────────────────────────────────
|
|
FROM debian:12-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates curl jq && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Non-root user
|
|
RUN groupadd -g 1000 lux && useradd -u 1000 -g lux -m lux
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy binary and plugin
|
|
COPY --from=builder /go/bin/luxd /app/luxd
|
|
COPY --from=plugin /tmp/evm-plugin /app/plugins/mgj786NP7uDwBCcq6YwThhaN8FLyybkCa4zBWTQbNgmK6k9A6
|
|
|
|
# Genesis and chain config
|
|
RUN mkdir -p /app/data /app/logs /app/configs/chains/C /app/genesis
|
|
COPY docker/genesis/mainnet/ /app/genesis/
|
|
|
|
RUN echo '{"snowman-api-enabled":true,"warp-api-enabled":false,"genesis":"/app/genesis/cchain.json","eth-apis":["eth","eth-filter","net","web3","debug","internal-eth","internal-blockchain","internal-transaction","internal-tx-pool","internal-account"]}' \
|
|
> /app/configs/chains/C/config.json
|
|
|
|
RUN chown -R lux:lux /app
|
|
USER lux
|
|
|
|
EXPOSE 9630 9631
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=5 \
|
|
CMD curl -sf http://localhost:9630/v1/health || exit 1
|
|
|
|
ENTRYPOINT ["/app/luxd"]
|