mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* bump avalanchego to v1.10.14 * fix versions in readme * bump min golang version * bump anr
33 lines
1.2 KiB
Docker
33 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:experimental
|
|
|
|
# ============= Setting up base Stage ================
|
|
# Set required AVALANCHE_VERSION parameter in build image script
|
|
ARG AVALANCHE_VERSION
|
|
|
|
# ============= Compilation Stage ================
|
|
FROM golang:1.20.10-bullseye AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy avalanche dependencies first (intermediate docker image caching)
|
|
# Copy avalanchego directory if present (for manual CI case, which uses local dependency)
|
|
COPY go.mod go.sum avalanchego* ./
|
|
|
|
# Download avalanche dependencies using go mod
|
|
RUN go mod download && go mod tidy -compat=1.20
|
|
|
|
# Copy the code into the container
|
|
COPY . .
|
|
|
|
# Pass in SUBNET_EVM_COMMIT as an arg to allow the build script to set this externally
|
|
ARG SUBNET_EVM_COMMIT
|
|
ARG CURRENT_BRANCH
|
|
|
|
RUN export SUBNET_EVM_COMMIT=$SUBNET_EVM_COMMIT && export CURRENT_BRANCH=$CURRENT_BRANCH && ./scripts/build.sh /build/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
|
|
|
|
# ============= Cleanup Stage ================
|
|
FROM avaplatform/avalanchego:$AVALANCHE_VERSION AS builtImage
|
|
|
|
# Copy the evm binary into the correct location in the container
|
|
COPY --from=builder /build/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy /avalanchego/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
|