Files
universe/docker/Dockerfile.fullstack
T
zeekayandHanzo Dev e917a87bbf build: bump Go builder images to 1.26.5, set GOTOOLCHAIN=auto
Currency bump: golang builder images -> 1.26.5 (latest stable).

Adds ENV GOTOOLCHAIN=auto to each Go builder stage. The official golang
images set GOTOOLCHAIN=local, so a builder image older than the module's
go directive is a hard mid-build failure. The pin stays the hermetic fast
path; auto is the safety net for the next go.mod bump.

No go.mod go directive was changed. Builder images move; directives stay.

docker/Dockerfile.node pins ARG GO_VERSION=1.26.5 instead of the
floating 1.26, so the builder is reproducible rather than drifting with
whatever the golang:1.26 tag points at on any given day.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 16:28:38 -07:00

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.5-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"]