Skip to content

Commit

Permalink
fixing imagikit extension
Browse files Browse the repository at this point in the history
  • Loading branch information
dersonsena committed Nov 13, 2021
1 parent 9ce305b commit e7b2b28
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 39 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.idea
.docker
webroot
.docker
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.5'
services:
app-74:
container_name: dersonsena-php-app
container_name: dersonsena-php7
image: dersonsena/php-nginx-dev:7.4
ports:
- "8080:80"
Expand All @@ -14,7 +14,7 @@ services:
- NGINX_DOCUMENT_ROOT=/var/www/html/webroot

app-80:
container_name: dersonsena-app
container_name: dersonsena-php8
image: dersonsena/php-nginx-dev:8.0
ports:
- "8081:80"
Expand Down
71 changes: 39 additions & 32 deletions php/7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,47 @@ ENV REDIS_VERSION=5.3.4
ENV COMPOSER_VERSION=2.1.3
ENV GIT_VERSION=2.32.0-r0

RUN apk update && apk add --no-cache --update \
RUN apk --no-cache update \
&& apk --no-cache upgrade \
&& apk add --no-cache --virtual .deps \
$PHPIZE_DEPS \
git=${GIT_VERSION} \
nano \
vim \
g++ \
gcc \
curl \
libxml2 \
zip \
unzip \
wget \
moreutils \
tzdata \
freetype \
graphicsmagick \
imagemagick \
imagemagick-libs \
file \
shadow \
autoconf \
make \
libtool \
icu-libs \
zlib \
libgomp

RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
icu-dev \
zlib-dev \
libzip-dev \
git=${GIT_VERSION} \
nano \
vim \
g++ \
gcc \
curl \
curl-dev \
postgresql-dev \
libxml2 \
libxml2-dev \
graphicsmagick \
zip \
unzip \
wget \
moreutils \
icu-dev \
oniguruma-dev \
tzdata \
freetype \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
imagemagick \
imagemagick-libs \
imagemagick-dev \
file \
shadow \
autoconf \
make \
libtool \
freetype-dev \freetype-dev \
pcre-dev \
yaml-dev \
libmcrypt-dev \
Expand All @@ -72,7 +80,8 @@ RUN apk update && apk add --no-cache --update \
jpeg-dev \
openldap-dev \
libxslt-dev \
rabbitmq-c-dev
rabbitmq-c-dev \
imagemagick-dev

RUN docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
Expand All @@ -95,18 +104,17 @@ RUN docker-php-ext-install pdo \
&& docker-php-ext-install opcache \
&& docker-php-ext-install tokenizer \
&& docker-php-ext-install iconv \
&& docker-php-ext-install exif \
&& php -m

# Installing GD extension
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd

# Installing Imagemagick
RUN printf "\n" | pecl install imagick && docker-php-ext-enable --ini-name 20-imagick.ini imagick
RUN pecl install imagick && docker-php-ext-enable --ini-name 20-imagick.ini imagick

# Installing PCOV
RUN printf "\n" | pecl install pcov && docker-php-ext-enable pcov
RUN pecl install pcov && docker-php-ext-enable pcov

# Installing YAML
RUN pecl install -o -f yaml && docker-php-ext-enable yaml
Expand All @@ -130,14 +138,13 @@ RUN pecl install -o -f amqp && docker-php-ext-enable amqp

# Making copy of php.ini development file
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini

RUN rm -rf /var/cache/apk/*

RUN curl -fsSL https://getcomposer.org/installer | php -- --version=${COMPOSER_VERSION} --install-dir=/usr/local/bin --filename=composer

COPY entrypoint.sh /etc/entrypoint.sh
RUN chmod +x /etc/entrypoint.sh
RUN apk del $PHPIZE_DEPS && rm -rf /var/cache/apk/*
RUN apk del $PHPIZE_DEPS
RUN rm -rf /var/cache/apk/*

WORKDIR /
EXPOSE 9000
Expand Down
7 changes: 4 additions & 3 deletions php/8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ RUN apk update && apk add --no-cache --update \
jpeg-dev \
openldap-dev \
libxslt-dev \
rabbitmq-c-dev
rabbitmq-c-dev \
libgomp

RUN docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
Expand Down Expand Up @@ -103,10 +104,10 @@ RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd

# Installing Imagemagick
RUN printf "\n" | pecl install imagick && docker-php-ext-enable --ini-name 20-imagick.ini imagick
RUN pecl install imagick && docker-php-ext-enable --ini-name 20-imagick.ini imagick

# Installing PCOV
RUN printf "\n" | pecl install pcov && docker-php-ext-enable pcov
RUN pecl install pcov && docker-php-ext-enable pcov

# Installing YAML
RUN pecl install -o -f yaml && docker-php-ext-enable yaml
Expand Down
3 changes: 3 additions & 0 deletions webroot/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

phpinfo();

0 comments on commit e7b2b28

Please sign in to comment.