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

     1  # TAG should identify the builder image
     2  ARG TAG
     3  
     4  # ============= Compilation Stage ================
     5  FROM antithesis-avalanchego-builder:$TAG AS builder
     6  
     7  # The workdir is hard-coded since this Dockerfile is only intended for instrumented builds.
     8  WORKDIR /avalanchego_instrumented/customer
     9  
    10  # Build avalanchego with race detection (-r) enabled.
    11  RUN ./scripts/build.sh -r
    12  
    13  # ============= Cleanup Stage ================
    14  FROM debian:11-slim AS execution
    15  
    16  # Copy identifying information into the container
    17  COPY --from=builder /build/commit_hash.txt ./commit_hash.txt
    18  
    19  # Copy the antithesis dependencies into the container
    20  RUN mkdir -p /symbols
    21  COPY --from=builder /avalanchego_instrumented/symbols /symbols
    22  COPY --from=builder /opt/antithesis/lib/libvoidstar.so /usr/lib/libvoidstar.so
    23  
    24  # Use the same path as the uninstrumented node image for consistency
    25  WORKDIR /avalanchego/build
    26  
    27  # Copy the executable into the container
    28  COPY --from=builder /avalanchego_instrumented/customer/build/avalanchego ./avalanchego
    29  
    30  CMD [ "./avalanchego" ]