github.com/MetalBlockchain/metalgo@v1.11.9/tests/antithesis/xsvm/Dockerfile.node (about)

     1  # TAG should identify the builder image
     2  ARG TAG
     3  
     4  # AVALANCHEGO_NODE_IMAGE needs to identify an existing avalanchego node image and should include the tag
     5  ARG AVALANCHEGO_NODE_IMAGE
     6  
     7  # ============= Compilation Stage ================
     8  FROM antithesis-avalanchego-builder:$TAG AS builder
     9  
    10  # The builder workdir will vary between instrumented and non-instrumented builders
    11  ARG BUILDER_WORKDIR
    12  
    13  WORKDIR $BUILDER_WORKDIR
    14  
    15  # Build xsvm VM
    16  RUN ./scripts/build_xsvm.sh
    17  
    18  # ============= Cleanup Stage ================
    19  FROM $AVALANCHEGO_NODE_IMAGE AS execution
    20  
    21  # The commit hash and antithesis dependencies should be part of the base image.
    22  
    23  # The builder workdir will vary between instrumented and non-instrumented builders
    24  ARG BUILDER_WORKDIR
    25  
    26  # Copy the executable into the container
    27  RUN mkdir -p /root/.avalanchego/plugins
    28  COPY --from=builder $BUILDER_WORKDIR/build/xsvm \
    29      /root/.avalanchego/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH
    30  
    31  # The node image's entrypoint will be reused.