vercel-community / php

🐘 PHP Runtime for ▲ Vercel Serverless Functions (support 7.4-8.3)

Home Page:https://php.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to install additional CLI packages?

DenverCoder1 opened this issue · comments

Is it currently possible to tell Vercel to install additional packages to be made available at runtime?

I am not referring to packages installable via Composer, but rather ones you would install for use on the command line.

For example, if I wanted to run inkscape via shell_exec, would I be able to tell Vercel to install the inkscape package and avoid getting the sh: line 98: inkscape: command not found error?

Hi. There is build phase and runtime phase. During build phase we can install anything you want. But during runtime phase is it problematic. Is inkscape single binary without dependencies?

Thanks for taking a look.

Not sure about dependencies, but it seems there are a few options including an executable Appimage.

https://inkscape.org/release/inkscape-1.2.2/

Any update on this?

Is there anything I can do to get inkscape installed?

Or, if not, is it possible to get the Imagick PHP extension?

Thanks!

Hi @DenverCoder1, I don't the the easy way how to do it right now.

Ok, no problem.

On Heroku, I was able to add third party buildpacks that can install things. I have gotten inkscape working there by adding the buildpack https://github.com/heroku/heroku-buildpack-apt and having an Aptfile with "inkscape" as the contents.

Is it possible to install apt packages listed in a file with Vercel? I'm not really sure how Vercel's runtime works.

Aptfile would be great, but it's not possible right now.

Okay, I'll look forward to hearing if you do find a good solution. 👍