LifeHacks, Coliving & Permaculture 🌱

I was always able to deploy until few days ago

------
production.Dockerfile:50
--------------------
  49 |     COPY Gemfile Gemfile.lock ./
  50 | >>> RUN bundle install && \
  51 | >>>     rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
  52 | >>>     bundle exec bootsnap precompile --gemfile
  53 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c bundle install &&     rm -rf ~/.bundle/ \"${BUNDLE_PATH}\"/ruby/*/cache \"${BUNDLE_PATH}\"/ruby/*/bundler/gems/*/.git &&     bundle exec bootsnap precompile --gemfile" did not complete successfully: exit code: 137

Exit code 137 : means out of memory from Docker

I have an Hetzner 2go ram

free -h

Mem:           1.9Gi       1.2Gi       102Mi        20Mi       544Mi       433Mi

I found another user on discord that also had an M2 (Apple Silicon) with Rosetta enabled. Adding multiarch fixes it

builder:
  dockerfile: production.Dockerfile
  multiarch: false # fixes 137 error out of memory
  remote:
    arch: amd64
    host: ssh://root@xxx.xxx.xxx.xxx
You've successfully subscribed to Stephane Bounmy
Welcome back! You've successfully signed in.
Great! You've successfully signed up.
Your link has expired
Success! Your account is fully activated, you now have access to all content.