{"repo":"ledermann/docker-rails-base","free":true,"listed":false,"github":"https://github.com/ledermann/docker-rails-base","clone":"git clone https://github.com/ledermann/docker-rails-base.git","description":"Optimized Docker image for Rails applications","language":"Dockerfile","stars":312,"topics":["docker","ruby-on-rails","alpine","multi-stage"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"DockerRailsBase Building Docker images usually takes a long time. This repo contains base images with preinstalled dependencies for Ruby on Rails, so building a production image will be 2-3 times faster . What? When using the official Ruby image, building a Docker image for a typical Rails application requires lots of time for installing dependencies - mainly OS packages, Ruby gems, Ruby gems with native extensions (Nokogiri etc.) and Node modules. This is required every time the app needs to be deployed to production. I was looking for a way to reduce this time, so I created base images that contain most of the dependencies used in my applications. And while I'm at it, I also moved as much as possible from the app-specific Dockerfile into the base image by using ONBUILD triggers. This makes the Dockerfile in my apps small and simple. Performance I compared building times using a typical Rails application. This is the result on my local machine: - Based on official Ruby image: 4:50 min - Based on DockerRailsBase: 1:57 min As you can see, using DockerRailsBase is more than 2 times faster compared to the official Ruby image. It saves nearly 3 min on every build. Note: Before I started timing, the base image was not available on my machine, so it was downloaded first, which took some time. If the base image is already available, the building time is only 1:18 min ( 3 times faster ). Requirements This repo is based on the following assumptions: - Your Docker host is compatible wi","default_branch":null,"files":null,"tree":[],"storefront":"/r/ledermann","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ledermann/docker-rails-base/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}