APT Buildpack

Purpose of This Buildpack

The environment used to build and run applications, based on Ubuntu, is embedding a wide set of libraries and binaries. However, your application might require one or multiple dependencies which are not present by default. The APT buildpack aims at installing additional packages using the apt package manager.

Details about the default environment can be found on the following page: Scalingo Builder - Our base Docker image

Set up this buildpack for your application

This buildpack is designed to be used with one or more additional buildpacks, thanks to the multi buildpack.

When creating a new Scalingo app:

$ scalingo create my-app
$ cat << EOF > .buildpacks

The above commands configure your application to use the multi buildpack, and define the .buildpacks file. This file configures the different buildpacks to apply. In this example, we configure the APT and the Ruby buildpack.


Once the buildpack is configured for your app, the packages to install have to be defined in a file named Aptfile which should be located at the root of the application.

It can contain three types of information:

  • A package name present in the Ubuntu repository
  • An URL to a .deb package which will be downloaded and installed
  • A :repo:deb instruction to add an APT repository to download packages from
:repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe

Of course, the three types of value can be combined, for example:

:repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe


At the next deployment, the APT buildpack should be doing its job (example with poppler-utils package):

=====> Downloading Buildpack: https://github.com/Scalingo/apt-buildpack
=====> Detected Framework: Apt
-----> Reusing cache
-----> Updating apt caches
       Ign http://archive.ubuntu.com trusty InRelease
       Hit http://apt.postgresql.org trusty-pgdg/main amd64 Packages
       Reading package lists...
-----> Fetching .debs for poppler-utils
       Reading package lists...
       Building dependency tree...
       The following extra packages will be installed:
       The following NEW packages will be installed:
         libpoppler44 poppler-utils
       0 upgraded, 2 newly installed, 0 to remove and 73 not upgraded.
       Need to get 0 B/824 kB of archives.
       After this operation, 3066 kB of additional disk space will be used.
       Download complete and in download only mode
-----> Installing libpoppler44_0.24.5-2ubuntu4.9_amd64.deb
-----> Installing poppler-utils_0.24.5-2ubuntu4.9_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files

Suggest edits

APT Buildpack

©2024 Scalingo