Open thkus opened 2 years ago
Hi @thkus, I just ran the following to verify the extension is there and it shows up.
Can you run the following and provide the output?
docker run --rm --pull always --entrypoint php -it craftcms/nginx:8.0 -m
Just a few follow up items:
composer
? The craftcms/nginx:x
images don't contain composer
except the -dev
images which are used for Nitro.composer
in its own container, it has no extensions so you have to run composer install --ignore-platform-reqs
Dockerfile
Hi @jasonmccallister,
thanks for the quick reply.
The output from docker run --rm --pull always --entrypoint php -it craftcms/nginx:8.0 -m
is:
[PHP Modules]
bcmath
blackfire
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
imagick
intl
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
SimpleXML
soap
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
blackfire
Our Dockerfile looks like this (stripped down, but reproducible):
FROM craftcms/nginx:8.0
# Be root
USER root
# Install build dependencies
RUN apk add --no-cache --virtual .build-deps composer
# Copy code base
COPY --chown=www-data:www-data ./site /app
# Don't run composer as root
USER www-data
# Install dependencies
RUN composer install --prefer-dist --no-scripts --no-dev --no-interaction -d /app/
# Don't be root anymore
USER www-data
# Overwrite entrypoint
ENTRYPOINT [ "sh", "/etc/startup.sh" ]
It works when i manually install dependencies like so:
RUN apk add --no-cache mysql-client \
libxml2-dev \
php8-mbstring \
php8-xml \
php8-xmlreader \
php8-xmlwriter \
php8-pdo \
php8-dom \
php8-simplexml \
php8-fileinfo \
php8-tokenizer \
php8-gd \
libpng-dev \
libpng \
$PHPIZE_DEPS
Description
While running a deployment via gitlab-ci the latest base image
craftcms/nginx:8.0
was pulled from Docker Hub. The subsequentcomposer install
failed because several PHP extensions were suddenly missing. Has there been a change in the base image that caused this?How could we possibly avoid changes like that? Is there a versioning in place so we can set fixed versions for the base images we use?
Steps to reproduce
Additional info