github.com/noisysockets/netstack@v0.6.0/Earthfile (about)

     1  VERSION 0.7
     2  FROM debian:bullseye
     3  WORKDIR /workspace
     4  
     5  tidy:
     6    LOCALLY
     7    RUN go mod tidy
     8    RUN go fmt ./...
     9  
    10  vendor:
    11    RUN apt update
    12    RUN apt install -y patch
    13    RUN mkdir -p gvisor netstack
    14    WORKDIR /workspace/gvisor
    15    GIT CLONE --branch=go https://github.com/google/gvisor.git .
    16    WORKDIR /workspace/netstack
    17    # Copy across selected source packages.
    18    COPY scripts ./scripts
    19    RUN ./scripts/vendor.sh
    20    # Apply patches.
    21    COPY patches ./patches
    22    RUN for p in patches/*.diff; do \
    23        patch -p1 < "$p"; \
    24      done
    25    SAVE ARTIFACT ./pkg AS LOCAL ./pkg
    26  
    27  clean:
    28    LOCALLY
    29    RUN rm -rf pkg