github.com/grafana/pyroscope@v1.18.0/examples/language-sdk-instrumentation/ruby/rideshare_rails/Dockerfile (about)

     1  FROM ruby:3.3.9-slim
     2  
     3  # Install runtime and build dependencies
     4  RUN apt-get update && apt-get install -y --no-install-recommends \
     5      libsqlite3-0 \
     6      libyaml-0-2 \
     7      build-essential \
     8      libsqlite3-dev \
     9      libyaml-dev \
    10      pkg-config \
    11      && rm -rf /var/lib/apt/lists/*
    12  
    13  RUN mkdir -p /usr/src/app
    14  WORKDIR /usr/src/app
    15  
    16  ENV RAILS_ENV=production
    17  ENV RAILS_SERVE_STATIC_FILES=true
    18  ENV RAILS_LOG_TO_STDOUT=true
    19  
    20  COPY Gemfile /usr/src/app/
    21  COPY Gemfile.lock /usr/src/app/
    22  
    23  RUN bundle config --global frozen 1
    24  RUN bundle install --without development test
    25  
    26  COPY app /usr/src/app/app
    27  COPY bin /usr/src/app/bin
    28  COPY config /usr/src/app/config
    29  COPY public /usr/src/app/public
    30  
    31  COPY Rakefile /usr/src/app/
    32  COPY config.ru /usr/src/app/
    33  
    34  EXPOSE 5000
    35  
    36  RUN rm -f tmp/pids/server.pid
    37  
    38  ENV RIDESHARE_LISTEN_PORT=5000
    39  
    40  CMD sh -c "exec rails s -b 0.0.0.0 -p ${RIDESHARE_LISTEN_PORT}"
    41