Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Allow installing packages with apt-get #519

Open
dmbaturin opened this issue Jan 11, 2021 · 5 comments
Open

Allow installing packages with apt-get #519

dmbaturin opened this issue Jan 11, 2021 · 5 comments

Comments

@dmbaturin
Copy link

What's the reason not to allow users to install packages from the standard APT repos?

#411 adds homebrew, but it means everything will be rebuilt from source every time, even tools that are available as binary packages from the repos.

@sztomi
Copy link

sztomi commented Apr 2, 2021

I'm running into a lot of trouble because of this as well. There is no reason to disallow package installation in a container.

This seems to be the official answer to this:

image

However, with the newer build image being so out of date (16.04 was released 5 years ago!), it's getting really difficult to just grab a binary from somewhere on the internet and run it (the glibc version will be too old). I want to do a really simple thing: iterate all my images and create a webp version. But webp is missing in the container. I could apt-get install it, but that is not allowed.

@dmbaturin
Copy link
Author

@sztomi Do you have a link to that thread?

Also, even if the image wasn't so old, there are still many reasons to install packages with APT.

  • Many tools available from Ubuntu repos do not have readily available single binary or AppImage versions.
  • Some packages require data (e.g. spell checker dictionaries). Installing with APT will usually give you a complete setup at once, without it you need to repeat the packager's work.
  • If you are using a tool for your local builds but cannot install it in the build image, you need to adjust your build procedures just for Netlify.

Last but not least, I believe Netlify is the only CI service that for some reason disallows installing packages. I like the hosting part, but when I started using it, it never came to my mind to check whether installing packages is possible.

@sztomi
Copy link

sztomi commented Apr 4, 2021

@dmbaturin It's in this thread: https://answers.netlify.com/t/apt-get-install-build-dependency/3095

And I completely agree with your points. This is a baffling limitation.

@jpreynat
Copy link

Agreed. This is a huge limitation.
We have a specific Node module that requires preinstalled binaries (krb5-config) to compile through node-gyp, and there's nothing we can do about it because of this limitation.

Using a custom Docker image would also work, but apt-get seems the most decent solution for 99% of use-cases.

@hwittenborn
Copy link

Agreed. This is a huge limitation.

I'm feeling that too - a project I work on needs libapt-pkg-dev installed so that it can properly build some development documentation, and that's currently impossible. The package can't even be manually downloaded with apt download libapt-pkg-dev as the cache appears to be being cleared before the image is built or something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants