FROM ruby:3.1.4-alpine3.19 AS base ARG TARGETPLATFORM ENV LANG=C.UTF-8 \ LC_ALL=C.UTF-8 \ TZ=Europe/London \ RAILS_ROOT=/usr/src/app RUN apk --no-cache upgrade RUN apk add --no-cache tzdata # Only packages required to run Rails in the production environment can be added to `.essentials`. # postgresql-dev: Required by the postgre gem # imagemagick, imagemagick-jpeg: Required by the mini_magick gem # wkhtmltopdf: Required by wicked_pdf and wkhtmltopdf-binary RUN set -e && \ apk add --no-cache --virtual .essentials \ postgresql-client \ imagemagick \ imagemagick-jpeg && \ apk add --no-cache --virtual wkhtmltopdf WORKDIR $RAILS_ROOT FROM base AS development-base RUN apk add --no-cache --virtual .build-deps build-base postgresql-dev git nodejs yarn # Adjust pre-packaged Alpine gems and software to match current version of OpenFoodNetwork RUN gem install bundler -v '2.4.3' RUN gem install rake -v '13.2.1' && gem uninstall rake -v '13.0.6' --executables || true RUN <