Measures for insufficient memory capacity of docker compose build

See here. https://kazmax.zpp.jp/linux_beginner/mkswap.html

Solution Add a swap area to enable bundle install.

The following error statement.

Installing nokogiri 1.10.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/nokogiri-1.10.10/ext/nokogiri
/usr/local/bin/ruby -r ./siteconf20201104-6-1o7c1oy.rb extconf.rb
Cannot allocate memory - /usr/local/bin/ruby -r ./siteconf20201104-6-1o7c1oy.rb
extconf.rb 2>&1

Gem files will remain installed in /usr/local/bundle/gems/nokogiri-1.10.10 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/2.5.0/nokogiri-1.10.10/gem_make.out

An error occurred while installing nokogiri (1.10.10), and Bundler cannot

continue.
Make sure that `gem install nokogiri -v '1.10.10' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 5.2.4.4, which depends on
    actioncable was resolved to 5.2.4.4, which depends on
      actionpack was resolved to 5.2.4.4, which depends on
        actionview was resolved to 5.2.4.4, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri
ERROR: Service 'app' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 5

Recommended Posts

Measures for insufficient memory capacity of docker compose build
Build Rails environment with Docker Compose
Build a development environment for Django + MySQL + nginx with Docker Compose
[Docker ECS] Detailed settings for docker compose up
Time shift measures with Docker for Windows
Build a development environment for Docker + Rails6 + Postgresql
[Docker] Introduction to docker compose Basic summary of docker-compose.yml
Install an older version of Docker for Mac
Build a simple Docker Compose + Django development environment
Build a container for Docker x Laravel phpMyAdmin
Repository structure for one-touch build of Node-RED container
Build a development environment for Docker, java, vscode
3 Tips to Improve Lead Time for Docker Build