Use dockerfile from 0.23.5

This commit is contained in:
Eugene Burmakin
2025-02-01 19:49:57 +01:00
parent 27714985de
commit 8aa3e6818c

View File

@@ -1,4 +1,4 @@
FROM ruby:3.3.4-slim
FROM ruby:3.3.4-alpine
ENV APP_PATH=/var/app
ENV BUNDLE_VERSION=2.5.21
@@ -6,27 +6,22 @@ ENV BUNDLE_PATH=/usr/local/bundle/gems
ENV RAILS_LOG_TO_STDOUT=true
ENV RAILS_PORT=3000
ENV RAILS_ENV=development
ENV BUNDLE_FORCE_RUBY_PLATFORM=1
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
# Install dependencies for application
RUN apt-get update -qq && apt-get install -y \
build-essential \
RUN apk -U add --no-cache \
build-base \
git \
libpq-dev \
postgresql-dev \
postgresql-client \
libxml2 \
libxml2-dev \
libxslt1-dev \
libxslt-dev \
nodejs \
npm \
yarn \
imagemagick \
tzdata \
less \
libyaml-dev \
pkg-config \
&& npm install -g yarn \
&& rm -rf /var/lib/apt/lists/* \
yaml-dev \
gcompat \
&& mkdir -p $APP_PATH
# Update gem system and install bundler
@@ -40,7 +35,7 @@ COPY ../Gemfile ../Gemfile.lock ../.ruby-version ../vendor ./
# Install all gems into the image
RUN bundle config set --local path 'vendor/bundle' \
&& bundle install --jobs 1 --retry 3 \
&& bundle install --jobs 4 --retry 3 \
&& rm -rf vendor/bundle/ruby/3.3.0/cache/*.gem
# Copy the rest of the application