Skip to content

Commit

Permalink
Fix: Docker container does not build locally
Browse files Browse the repository at this point in the history
Instead of installing PHP extensions via `apk` _(Which fails)_, use `mlocati/docker-php-extension-installer`

Also fix missing step in README that causes `composer build` to fail

Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Aug 19, 2024
1 parent a9b566d commit fd0b68f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ RUN mkdir -p /assets && mv /work/build/* /assets
# Build the PHP container
FROM php:8.3-fpm-alpine

# System dependencies
# RUN mkdir -p /etc/apk && echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN apk update && \
apk add --no-cache \
bash \
php8-bcmath \
php8-bz2 \
php8-dom \
php8-intl \
php8-opcache \
php8-pcntl \
php8-sockets \
php8-xsl \
php8-zip
apk add --no-cache bash

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions \
bcmath \
bz2 \
dom \
intl \
opcache \
pcntl \
sockets \
xsl \
zip

# PHP configuration
COPY .docker/php/getlaminas.ini /usr/local/etc/php/conf.d/999-getlaminas.ini
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Fourth, prepare the blog and security announcements:

```bash
$ mkdir -p var/blog/feeds
$ mkdir -p public/js
$ composer build
```

Expand Down

0 comments on commit fd0b68f

Please sign in to comment.