What do we have to lose

This commit is contained in:
Eugene Burmakin 2025-02-05 21:57:34 +01:00
parent 21022d56a6
commit 13be27d311

View file

@ -21,8 +21,8 @@ RUN apt-get update && apt-get install -y \
tzdata \
less \
libyaml-dev \
gcc-11 \
g++-11 \
gcc-10 \
g++-10 \
make \
libgeos-dev \
libproj-dev \
@ -30,8 +30,8 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p $APP_PATH \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
# Update gem system and install bundler
RUN gem update --system 3.6.2 \
@ -42,10 +42,17 @@ WORKDIR $APP_PATH
COPY ../Gemfile ../Gemfile.lock ../.ruby-version ../vendor ./
# Set environment variables for compilation
ENV CFLAGS="-O2 -pipe -fstack-protector-strong" \
CXXFLAGS="-O2 -pipe -fstack-protector-strong" \
MAKEFLAGS="-j2"
# Install all gems into the image with reduced parallelism for ARM64
RUN bundle config set --local path 'vendor/bundle' \
&& bundle config set --local jobs 2 \
&& bundle config set build.nokogiri --use-system-libraries \
&& bundle config build.racc --with-cflags="-O2 -pipe" \
&& bundle config build.oj --with-cflags="-O2 -pipe" \
&& bundle install --retry 3 \
&& rm -rf vendor/bundle/ruby/3.4.0/cache/*.gem