Heroku-18 Stack
Last updated August 24, 2022
Table of Contents
The Heroku-18 stack is deprecated and will reach end-of-life on April 30th, 2023. Please upgrade to a newer stack as soon as possible. See the Heroku-18 End-Of-Life FAQ for more details.
This article describes the Heroku-18 stack, based on Ubuntu 18.04. What is a stack?
What’s new
This stack is now based on Ubuntu 18.04, compared to Ubuntu 16.04 used in the Heroku-16 stack.
Package installations were performed using apt-get
‘s --no-install-recommends
option, which removed many unneeded packages mostly related to the X11 windowing system and Tcl/Tk that were present in previous stacks, resulting in a smaller stack image size. The Ubuntu Packages on Heroku article lists all package additions, changes and removals compared to previous stacks.
Available software
Every stack on Heroku supports different operating system packages and language runtime versions. This support is typically confined to software that was still actively developed by the respective maintainers at the time the stack was first released.
Language runtimes
For the most accurate information on supported language runtime versions, please check the individual language pages:
Buildpack | Shorthand | Runtime versions |
---|---|---|
Ruby | heroku/ruby |
Runtime versions |
Node.js | heroku/nodejs |
Runtime versions |
Python | heroku/python |
Runtime versions |
Java | heroku/java |
Runtime versions |
PHP | heroku/php |
Runtime versions |
Go | heroku/go |
Runtime versions |
Operating system packages
For a full list of operating system packages available on Heroku-18, please refer to article Ubuntu Packages on Heroku Stacks.
Support period
Heroku-18 is based on Ubuntu 18.04. It will be supported through April 2023. Learn more about Heroku’s stack update policy.
Using Heroku-18
Heroku-22 is currently the default stack for newly created apps.
You can specify a stack when creating an app:
$ heroku create --stack heroku-18
You may change the stack on an existing app; the next build performed will then use the new stack:
$ heroku stack:set heroku-18
If you are using app.json
, you should also specify the stack there to ensure that your Review Apps and Heroku CI runs use the same stack:
{
"stack": "heroku-18"
}
An existing app’s stack cannot be changed using app.json
. The stack specified is only applied to newly created apps that are a Review App, a Heroku CI test run app, or an app created using a Heroku Button.
Upgrading to Heroku-18
Please refer to the stack upgrading guide to understand the procedures to follow when upgrading to a new stack.
We recommend that you monitor your application closely after migrating an app to the new stack to ensure it’s performing correctly.
Heroku-18 Docker image
Heroku-18 is available as two Docker images:
- The runtime image (
heroku/heroku:18
), which is recommended over the build image for most workloads. - The build image (
heroku/heroku:18-build
), which is larger as it includes development headers and toolchains. It is only recommended for customers that need to compile source code or dependencies.
Use the following command in your Dockerfile
to use Heroku-18 as your base image:
FROM heroku/heroku:18
To learn more about deploying Docker images, please refer to the Heroku Container Registry and Runtime documentation.