Skip to content

Commit aa11546

Browse files
Add podman instructions, update imagick install method
1 parent 66eae1c commit aa11546

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

Dockerfile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,15 @@ RUN apk add --no-cache $PHPIZE_DEPS \
88
RUN docker-php-ext-configure gd --with-jpeg
99
RUN docker-php-ext-install intl pcntl gd exif zip mysqli pgsql pdo pdo_mysql pdo_pgsql bcmath opcache
1010

11+
# Install imagick extension
12+
RUN pecl install imagick; \
13+
docker-php-ext-enable imagick;
14+
1115
# Install xdebug extension
1216
RUN pecl install xdebug; \
1317
docker-php-ext-enable xdebug; \
1418
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini;
1519

16-
# Install imagick extension (workaround)
17-
ARG IMAGICK_VERSION=3.8.0
18-
# && pecl install imagick-"$IMAGICK_VERSION" \
19-
# && docker-php-ext-enable imagick \
20-
# && apk del .imagick-deps
21-
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/tags/${IMAGICK_VERSION}.tar.gz \
22-
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
23-
&& sed -i 's/php_strtolower/zend_str_tolower/g' imagick.c \
24-
&& phpize \
25-
&& ./configure \
26-
&& make \
27-
&& make install \
28-
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini
29-
3020
# Clean up build dependencies
3121
RUN apk del $PHPIZE_DEPS imagemagick-dev icu-dev zlib-dev jpeg-dev libpng-dev libzip-dev postgresql-dev libgomp
3222

readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,27 @@ This is a custom build based on PHP 8.4's Alpine docker image, with changes to m
77
This image includes:
88

99
- PHP 8.4 with `bcmath`, `exif`, `gd`, `intl`, `mysqli`, `opcache`, `pcntl`, `pdo_mysql`, `pdo_pgsql`, `pgsql`, `sodium`, `xdebug`, `zip` and `imagick` installed
10-
- Packages: `curl`, `git`, `sqlite`, `nano`, `ncdu`, `nodejs`, `npm`
10+
- Packages: `curl`, `git`, `sqlite`, `nano`, `ncdu`, `nodejs`, `npm`, `openssh-client`
1111
- Composer also comes pre-installed
1212

1313
For the latest list of inclusion, see the [Dockerfile](./Dockerfile).
1414

1515
## Quick start
1616

17+
### Docker
18+
1719
In order to build and then test the container:
1820

1921
docker buildx build . --platform linux/amd64 -t nicoverbruggen/php84-alpine \
2022
&& docker run -it nicoverbruggen/php84-alpine sh
2123

2224
You may omit the `--platform` flag if you wish to build a container for your own architecture, but there may be issues with dependencies.
2325

26+
### Podman
27+
28+
podman build . -t nicoverbruggen/php84-alpine \
29+
&& podman run -it nicoverbruggen/php84-alpine sh
30+
2431
## Automatic builds
2532

2633
The automatically build the container and have it pushed, you must:

0 commit comments

Comments
 (0)