github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/benchmark/Dockerfile (about)

     1  #                        _                     _
     2  #                       | |                   | |
     3  #  _ __  _   _ _ __ ___ | |__   ___ _ __   ___| |__
     4  # | '_ \| | | | '__/ _ \| '_ \ / _ \ '_ \ / __| '_ \
     5  # | |_) | |_| | | | (_) | |_) |  __/ | | | (__| | | |
     6  # | .__/ \__, |_|  \___/|_.__/ \___|_| |_|\___|_| |_|
     7  # | |     __/ |
     8  # |_|    |___/
     9  #
    10  
    11  FROM golang:1.17 as builder
    12  
    13  WORKDIR /go/src/app
    14  
    15  COPY go.mod go.sum ./
    16  RUN go mod download
    17  
    18  COPY ./pkg pkg
    19  COPY ./webapp webapp
    20  COPY ./benchmark benchmark
    21  
    22  RUN go build -o pyrobench ./benchmark/cmd
    23  
    24  USER pyrobench
    25  CMD ["./pyrobench"]
    26  
    27  FROM ubuntu:latest
    28  
    29  WORKDIR /var/lib/pyrobench
    30  
    31  RUN apt-get update && apt-get install ca-certificates -y && update-ca-certificates
    32  RUN apt-get update && apt-get install -y curl
    33  
    34  RUN curl https://pyroscope-public.s3.amazonaws.com/benchmark/fixtures.tgz | tar -xzv
    35  
    36  # Create a group and user
    37  #RUN addgroup -S pyrobench && adduser -S pyrobench -G pyrobench
    38  RUN useradd -ms /bin/bash pyrobench
    39  
    40  
    41  COPY --from=builder /go/src/app/pyrobench pyrobench
    42  
    43  USER pyrobench
    44  CMD ["./pyrobench"]