Skip to content
Snippets Groups Projects
Dockerfile 759 B
Newer Older
FROM ruby:3.2.1-slim-bullseye
# Bootstrap scripts will also be used by stage 2 (rails-runtime-base-image).
John Harris's avatar
John Harris committed
COPY /app/bootstrap*sh /app/
RUN chmod +x /app/bootstrap*sh
# Install OS packages required for the gem build environment.
RUN /app/bootstrap-apt-upgrade.sh && \
    apt-get install -y --no-install-recommends \
      build-essential \
      cmake \
      curl \
      default-libmysqlclient-dev \
      git \
      libpq-dev \
      nano \
      nodejs \
      pkg-config \
      ruby-dev \
      shared-mime-info \
      telnet && \
    /app/bootstrap-apt-clean.sh
# Prepare bundle for the gem build environment.
RUN /app/bootstrap-app-dir.sh
USER nexus
WORKDIR /app
COPY --chown=nexus:nexus Gemfile Gemfile.lock ./
RUN /app/bootstrap-app-bundle.sh