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]>
54 lines
1.4 KiB
Docker
54 lines
1.4 KiB
Docker
# Full-stack Lux node with EVM plugin
|
|
# Standard image for mainnet/testnet/devnet
|
|
# Build: docker build -f Dockerfile.fullstack -t ghcr.io/luxfi/node:fullstack .
|
|
|
|
FROM golang:1.26.8-alpine AS builder
|
|
|
|
ENV GOTOOLCHAIN=auto
|
|
ENV CGO_ENABLED=0
|
|
|
|
RUN apk add --no-cache git make gcc musl-dev linux-headers bash
|
|
|
|
WORKDIR /build
|
|
|
|
# Clone universe (contains all modules with go.work)
|
|
RUN git clone --depth 1 --recurse-submodules https://github.com/luxfi/universe.git
|
|
|
|
WORKDIR /build/universe
|
|
|
|
# Build node
|
|
RUN cd node && go build -o /build/luxd ./main
|
|
|
|
# Build EVM plugin (uses go.work for proper module resolution)
|
|
RUN cd evm && go build -o /build/plugins/mgj786NP7uDwBCcq6YwThhaN8FLyybkCa4zBWTQbNgmK6k9A6 ./plugin
|
|
|
|
# Final stage
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache ca-certificates curl bash jq
|
|
|
|
# Create lux user
|
|
RUN adduser -D -u 1000 lux
|
|
|
|
WORKDIR /luxd
|
|
|
|
# Copy binaries
|
|
COPY --from=builder /build/luxd /luxd/build/luxd
|
|
COPY --from=builder /build/plugins /luxd/plugins/
|
|
|
|
# Create directories with proper permissions
|
|
RUN mkdir -p /data/db /data/logs /data/staking /data/plugins && \
|
|
cp -r /luxd/plugins/* /data/plugins/ 2>/dev/null || true && \
|
|
chown -R lux:lux /data /luxd
|
|
|
|
USER lux
|
|
|
|
# Expose ports (mainnet=9630, testnet=9640, devnet=9650)
|
|
EXPOSE 9630 9631 9640 9641 9650 9651
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
|
|
CMD curl -sf http://localhost:${HTTP_PORT:-9630}/v1/health || exit 1
|
|
|
|
ENTRYPOINT ["/luxd/build/luxd"]
|
|
CMD ["--help"]
|