github.com/lzhfromustc/gofuzz@v0.0.0-20211116160056-151b3108bbd1/Dockerfile (about)

     1  # TODO: use multi-stage build to reduce image size
     2  
     3  FROM golang:1.16.4
     4  RUN apt update && apt install -y python3
     5  WORKDIR /gofuzz
     6  
     7  # copy source files to docker
     8  COPY goFuzz ./goFuzz
     9  COPY sync ./sync
    10  COPY runtime ./runtime
    11  COPY scripts ./scripts
    12  COPY time ./time
    13  COPY reflect ./reflect
    14  RUN cd goFuzz && make build
    15  
    16  # target directory expected to be the Golang source code folder
    17  COPY target-tmp /fuzz/target
    18  
    19  # Patch golang runtime in the container
    20  RUN chmod +x scripts/patch-go-runtime.sh \
    21  && ./scripts/patch-go-runtime.sh
    22  
    23  
    24  WORKDIR /gofuzz/goFuzz
    25  
    26  # RUN groupadd gfgroup
    27  # RUN useradd -r -u 1001 -g gfgroup gfuser
    28  # RUN chown gfuser:gfgroup ./scripts/fuzz.sh && chmod +x ./scripts/fuzz.sh
    29  # USER gfuser
    30  RUN chmod +x ./scripts/fuzz.sh
    31  ENTRYPOINT [ "scripts/fuzz.sh" ] 
    32  
    33  
    34