Giter Club home page Giter Club logo

Comments (3)

edmorley avatar edmorley commented on May 18, 2024 1

@davidhooey Hi! The Heroku stack images act as a base image that contains commonly used OS libraries and tooling, such as OpenSSL, compilers, C library development headers etc. The full list of packages they contain can be seen here:
https://devcenter.heroku.com/articles/stack-packages

Whilst some language toolchains (eg Python and Ruby) are included in the base image for convenience, these are not intended for use by your application, and more to make it easier for various compile-time scripts (that might have a dependency on another language) to just work. For example when using Node.js and npm installing a packaging, it might need to use node-gyp, which requires that Python be available on the system in some form.

Instead, an application's primary language is provided by a buildpack:
https://devcenter.heroku.com/articles/buildpacks

In the case of a Ruby app, that means this buildpack:
https://github.com/heroku/heroku-buildpack-ruby

So in production, your app won't be using the Ruby 2.7.0 from the stack image, but the copy of Ruby installed by the buildpack into your app's slug. The buildpack will also be performing other tasks beyond just providing Ruby -- for example helping to configure Rails.

If you wanted to more closely emulate Heroku builds locally, you would need to use one of the examples from this thread:
#56 (comment)

However, unless you have very specific requirements I would recommend just using the official Docker Hub Ruby images (eg ruby:2.7.2) when developing locally (for reduced complexity/image size), and instead catching the rare dev-prod parity issues via Heroku CI, Review Apps or a staging app.

from base-images.

davidhooey avatar davidhooey commented on May 18, 2024

Awesome, thanks!

from base-images.

edmorley avatar edmorley commented on May 18, 2024

You're welcome!

from base-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.