Skip to content

Commit

Permalink
What do we have to lose
Browse files Browse the repository at this point in the history
  • Loading branch information
Freika committed Feb 5, 2025
1 parent 21022d5 commit 13be27d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ 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 \
&& npm install -g yarn \
&& 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 \
Expand All @@ -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

Expand Down

0 comments on commit 13be27d

Please sign in to comment.