Report this

What is the reason for this report?

How to add libasound2-dev dependency to app build?

Posted on January 3, 2021

New to digital ocean, with Heroku it was as simple as adding a build pack - how do I do this with digital ocean please?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is possible to do today, but you’ll need to build using a Dockerfile, since we don’t yet support configuring multiple or overriding buildpacks on the App Platform.

Hi there,

Quick update here, the App Platform now supports this via Aptfile:

https://docs.digitalocean.com/products/app-platform/reference/buildpacks/aptfile/

App Platform looks for a file named Aptfile (no file extension) to detect an application requiring system packages. If this file is detected, the heroku-buildpack-apt buildpack is used to install any packages listed in the Aptfile during the build process.

The following example Aptfile declares three system packages to install:

libpq-dev
imagemagick
curl

This example installs:

  • libpq-dev: A library for PostgreSQL applications.
  • imagemagick: A command-line tool for image processing.
  • curl: A command line tool for making HTTP requests.

Another option here remains the usage of a Dockerfile which gives you more flexibility:

https://docs.digitalocean.com/products/app-platform/reference/dockerfile/

Hope that this helps!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.