Skip to content

Commit

Permalink
Add Heroku-20 stack (#154)
Browse files Browse the repository at this point in the history
This is an initial pass at creating a new Heroku-20 stack, based on
Ubuntu 20.04 ("Focal Fosa").

The process for creating the new stack was:
1. Copy the `heroku-18{,-build}` directories to `heroku-20{,-build}`.
2. Adjust the base image / APT sources to substitute 18.04/bionic
  references with 20.04/focal.
3. Adjust the packages list to account for renamed/removed packages,
   until the build passed.
4. Update documentation/Travis files.

To view the changes compared to Heroku-18, see the original PR,
where the copy and rename changes were made as two separate
commits.

Of note:
* The `python` and `python-dev` packages (which were the Python 2
  versions) no longer exist under Ubuntu 20.04. However there are still
  explicitly named `python2` and `python2-dev` packages - so it is at
  least possible to install Python 2 (if we want).
* Even if we don't explicitly install the `python2` package (this
  initial PR doesn't, it only explicitly installs Python 3), for the
  build image (only) it's pulled in by other packages regardless.
* The `python2` and `python2-dev` packages no longer install a
  binary/symlink for `python`. ie: Users must explicitly call the
  command `python{2,3}` and not `python`, unless we choose to add it
  back for compat (using the `python-is-python2` or
  `python-is-python3` packages).

Fixes W-7429923.
  • Loading branch information
edmorley authored Apr 15, 2020
1 parent f7ec858 commit 5aa96ad
Show file tree
Hide file tree
Showing 11 changed files with 1,258 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
- STACK=cedar-14 IMAGE_TAG=heroku/cedar:14 PRIVATE_IMAGE_TAG=heroku/cedar-private:14
- STACK=heroku-16 IMAGE_TAG=heroku/heroku:16 PRIVATE_IMAGE_TAG=heroku/heroku-private:16
- STACK=heroku-18 IMAGE_TAG=heroku/heroku:18 PRIVATE_IMAGE_TAG=heroku/heroku-private:18
- STACK=heroku-20 IMAGE_TAG=heroku/heroku:20 PRIVATE_IMAGE_TAG=heroku/heroku-private:20
script:
- bin/build.sh $STACK $IMAGE_TAG $IMAGE_TAG-build
- |
Expand Down
3 changes: 2 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ To build the stack images locally, run this from the repo root:

For example:

bin/build.sh heroku-18 heroku/heroku:18 heroku/heroku:18-build
./bin/build.sh heroku-20 heroku/heroku:20 heroku/heroku:20-build

The supported stacks are:

* `cedar-14` (this will fail unless the Ubuntu ESM credentials are set in the local environment)
* `heroku-16` (will also build a `heroku-16-build` image)
* `heroku-18` (will also build a `heroku-18-build` image)
* `heroku-20` (will also build a `heroku-20-build` image)


# Releasing Stack Images
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

[![Build Status](https://travis-ci.org/heroku/stack-images.svg?branch=master)](https://travis-ci.org/heroku/stack-images)

This repository holds recipes for building [Heroku stack images](https://devcenter.heroku.com/articles/stack). The recipes are also rendered into Docker images that are available on Docker Hub:
This repository holds recipes for building [Heroku stack images](https://devcenter.heroku.com/articles/stack).
The recipes are also rendered into Docker images that are available on Docker Hub:

* [Heroku-16/Heroku-18 Docker image](https://registry.hub.docker.com/u/heroku/heroku/)
* [Heroku-{16,18,20} Docker images](https://registry.hub.docker.com/u/heroku/heroku/)

Note: The [Cedar-14 Docker image](https://registry.hub.docker.com/u/heroku/cedar/) is no longer being updated,
since the Ubuntu ESM agreement requires that the updates we receive from Canonical are not published publicly.
Expand Down
1 change: 1 addition & 0 deletions heroku-20-build/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
installed-packages.txt
4 changes: 4 additions & 0 deletions heroku-20-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM heroku/heroku:20
COPY setup.sh /tmp/setup.sh
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive /tmp/setup.sh \
&& rm -rf /var/lib/apt/lists/*
Loading

0 comments on commit 5aa96ad

Please sign in to comment.