Created
June 9, 2021 18:22
-
-
Save marufmax/d24e2a144333be4f1f10e4df2d760ab1 to your computer and use it in GitHub Desktop.
PHP 8 with Imagick Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is a very basic PHP 8 Dockerfile with Imagick installed from source | |
## Modify/Customize this file as per your need | |
FROM php:8.0-fpm | |
RUN apt-get update && \ | |
apt-get install openssl -y && \ | |
apt-get install libssl-dev -y && \ | |
apt-get install wget -y && \ | |
apt-get install git -y && \ | |
apt-get install imagemagick libmagickwand-dev --no-install-recommends -y | |
# Imagick | |
RUN cd /tmp && git clone https://github.com/Imagick/imagick && \ | |
cd imagick && \ | |
phpize && \ | |
./configure && \ | |
make && make install | |
RUN touch /usr/local/etc/php/conf.d/imagick.ini && \ | |
echo 'extension=imagick.so' > /usr/local/etc/php/conf.d/imagick.ini | |
# RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 | |
# RUN chmod +x /usr/local/bin/dumb-init | |
RUN apt-get autoremove -y && rm -rf /var/lib/apt/lists/* | |
EXPOSE 9000 | |
WORKDIR /var/www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment