gitlab.com/flarenetwork/coreth@v0.1.1/Dockerfile (about)

     1  # syntax=docker/dockerfile:experimental
     2  
     3  # ============= Setting up base Stage ================
     4  # Set required AVALANCHE_VERSION parameter in build image script
     5  ARG AVALANCHE_VERSION
     6  
     7  # ============= Compilation Stage ================
     8  FROM golang:1.15.5-buster AS builder
     9  RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 git=1:2.20.1-2+deb10u3 make=4.2.1-1.2 gcc=4:8.3.0-1 musl-dev=1.1.21-2 ca-certificates=20200601~deb10u2 linux-headers-amd64=4.19+105+deb10u12
    10  
    11  WORKDIR /build
    12  # Copy and download avalanche dependencies using go mod
    13  COPY go.mod .
    14  COPY go.sum .
    15  RUN go mod download
    16  
    17  # Copy the code into the container
    18  COPY . .
    19  
    20  # Pass in CORETH_COMMIT as an arg to allow the build script to set this externally
    21  ARG CORETH_COMMIT
    22  ARG CURRENT_BRANCH
    23  
    24  RUN export CORETH_COMMIT=$CORETH_COMMIT && export CURRENT_BRANCH=$CURRENT_BRANCH && ./scripts/build.sh /build/evm
    25  
    26  # ============= Cleanup Stage ================
    27  FROM avaplatform/avalanchego:$AVALANCHE_VERSION AS builtImage
    28  
    29  # Copy the evm binary into the correct location in the container
    30  COPY --from=builder /build/evm /avalanchego/build/plugins/evm