Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add missing PHP extensions? #13

Open
simonhamp opened this issue Jun 28, 2024 · 1 comment
Open

How to add missing PHP extensions? #13

simonhamp opened this issue Jun 28, 2024 · 1 comment

Comments

@simonhamp
Copy link

I have a Composer dependency that requires imagick, but it seems it's not included here. How can I add it?

@KTanAug21
Copy link
Contributor

Hello @simonhamp!

1️⃣ If you want to locally build an image from this repository and include an additional package in that image, you can include the package in the list of packages installed from the Dockerfile template, in this line here. As you can see this line installs packages listed in a custom file, which is selected based on the current PHP_VERSION. These files are available in the php/packages/ folder.

2️⃣ On the other hand, if you'll be extending the image built from this repository, found in dockerhub. Then you can simply add another RUN command to install the extension, likeso:

ARG PHP_VERSION=8.2
ARG NODE_VERSION=18
FROM fideloper/fly-laravel:${PHP_VERSION} as base

ARG PHP_VERSION

# Include the new package
+ RUN apt-get update; \
+    apt-get install -y imagemagick php${PHP_VERSION}-imagick;

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

No branches or pull requests

2 participants