Comments (3)
@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 install
ing 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.
Awesome, thanks!
from base-images.
You're welcome!
from base-images.
Related Issues (20)
- Question: Heroku-20 general release date HOT 4
- ImageMagick default resource limits are surprisingly low HOT 5
- Installation of gettext fails on heroku-20; heroku-18 is fine HOT 5
- Postgres 13
- ARM64 support for image HOT 20
- How does one use Heroku-20 stack for local development WITH the same ruby/bundler versions as Heroku defaults to HOT 5
- ImageMagick "area" resource limit should be in pixels ? HOT 3
- `SSL_read: unexpected eof while reading` using `redis-rb` on Heroku-22 HOT 3
- heroku/heroku:22 doesn't download standard library HOT 1
- Stack 22 breaks azure cognitive services package HOT 2
- env PYTHONHOME trigger import error HOT 1
- Deprecated usage of apt-key.
- Add missing CNB Labels
- Update BUILD.md with multi-arch / heroku-24 info
- Duplicate APT sources warning when using APT on Heroku-24 HOT 3
- Reduce size of Heroku-24 run and build images HOT 2
- Heroku-24: Implications of the switch to separate Linux users for build vs run images HOT 10
- Stable tags for heroku/heroku:24 architecture variants HOT 2
- Heroku-24: Custom sources list causes APT to pull packages lists for multiple architectures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from base-images.