Skip to content

Commit 2021ad6

Browse files
committed
Third cut to php80 (using 8.0.0 beta3)
Moving from pecl to pickle. Still cannot install: - mongodb - oci8 - redis - solr - sqlsrv - xmlrpc
1 parent e74bb97 commit 2021ad6

File tree

4 files changed

+31
-16
lines changed

4 files changed

+31
-16
lines changed

Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.0.0beta1-apache-buster
1+
FROM php:8.0.0beta3-apache-buster
22

33
ADD root/ /
44
# Fix the original permissions of /tmp, the PHP default upload tmp dir.
@@ -9,10 +9,21 @@ RUN apt-get update && apt-get install -y \
99
git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12+
# Install pickle as an easier alternative to PECL (that, since PHP8 is not
13+
# bundled with PHP). Some alternatives searched were:
14+
# - https://olvlvl.com/2019-06-docker-pecl-without-pecl
15+
# - https://github.com/FriendsOfPHP/pickle
16+
# - manually "curl https://pecl.php.net/get/xxxx && tar && docker-php-ext-install xxx"
17+
# Of course, if the images end using some alternative, we'll switch to it. Just right now
18+
# there isn't such an alternative.
19+
RUN curl -L https://github.com/FriendsOfPHP/pickle/releases/download/v0.6.0/pickle.phar -o pickle.phar && \
20+
chmod +x pickle.phar && \
21+
mv pickle.phar /usr/local/bin/pickle
22+
1223
# Setup the required extensions.
1324
ARG DEBIAN_FRONTEND=noninteractive
1425
RUN /tmp/setup/php-extensions.sh
15-
RUN /tmp/setup/oci8-extension.sh
26+
# RUN /tmp/setup/oci8-extension.sh -- not existing as of 8.0.0beta3
1627
ENV LD_LIBRARY_PATH /usr/local/instantclient
1728

1829
RUN mkdir /var/www/moodledata && chown www-data /var/www/moodledata && \

root/tmp/setup/oci8-extension.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ rm /tmp/instantclient-sqlplus-linux.x64-19.6.0.0.0dbru.zip
2020
ln -s /usr/local/instantclient_19_6 /usr/local/instantclient
2121
ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus
2222

23-
echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && docker-php-ext-enable oci8
23+
echo "--with-oci8=instantclient,/usr/local/instantclient" > oci8_options
24+
pickle install oci8 --with-configure-options oci8_options
2425
echo 'oci8.statement_cache_size = 0' >> /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini
26+
rm oci8_options

root/tmp/setup/php-extensions.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ echo 'en_AU.UTF-8 UTF-8' >> /etc/locale.gen
4141
locale-gen
4242

4343
echo "Installing php extensions"
44+
45+
# ZIP
46+
docker-php-ext-configure zip --with-zip
47+
docker-php-ext-install zip
4448
docker-php-ext-install -j$(nproc) \
4549
intl \
4650
mysqli \
4751
opcache \
4852
pgsql \
4953
soap \
5054
xsl
51-
# xmlrpc -- not existing as of 8.0.0beta1
55+
# xmlrpc -- not existing as of 8.0.0beta3
5256

5357
# GD.
5458
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
@@ -58,13 +62,13 @@ docker-php-ext-install -j$(nproc) gd
5862
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/
5963
docker-php-ext-install -j$(nproc) ldap
6064

61-
# Memcached, MongoDB, Redis, APCu, igbinary.
62-
#pecl install memcached mongodb redis apcu igbinary uuid -- not existing as of 8.0.0beta1
63-
#docker-php-ext-enable memcached mongodb redis apcu igbinary uuid -- not existing as of 8.0.0beta1
64-
65-
# ZIP
66-
docker-php-ext-configure zip --with-zip
67-
docker-php-ext-install zip
65+
# Memcached, MongoDB, Redis, APCu, igbinary, uuid.
66+
pickle install memcached
67+
#pickle install mongodb -- not existing as of 8.0.0beta3
68+
#pickle install redis -- not existing as of 8.0.0beta3
69+
pickle install apcu
70+
pickle install igbinary
71+
pickle install uuid
6872

6973
echo 'apc.enable_cli = On' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
7074

@@ -79,15 +83,14 @@ echo 'apc.enable_cli = On' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
7983
# References:
8084
# - https://github.com/moodlehq/moodle-php-apache/issues/16 (part of the php72 image discussion)
8185
# - https://github.com/moodlehq/moodle-php-apache/issues/19 (awaiting for a better solution)
82-
# /tmp/setup/solr-extension.sh -- pecl not existing as of 8.0.0alpha3
86+
#/tmp/setup/solr-extension.sh -- not existing as of 8.0.0beta3
8387

8488
# Install Microsoft dependencies for sqlsrv.
8589
# (kept apart for clarity, still need to be run here
8690
# before some build packages are deleted)
87-
#/tmp/setup/sqlsrv-extension.sh -- pecl not existing as of 8.0.0alpha3
91+
# /tmp/setup/sqlsrv-extension.sh -- not existing as of 8.0.0beta3
8892

8993
# Keep our image size down..
90-
#pecl clear-cache -- not existing as of 8.0.0beta1
9194
apt-get remove --purge -y $BUILD_PACKAGES
9295
apt-get autoremove -y
9396
apt-get clean

root/tmp/setup/sqlsrv-extension.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ ACCEPT_EULA=Y apt-get install -y msodbcsql17
1616
ln -fsv /opt/mssql-tools/bin/* /usr/bin
1717

1818
# Need 5.7.0preview (or later) for PHP 7.4 support
19-
pecl install sqlsrv-5.8.1
20-
docker-php-ext-enable sqlsrv
19+
pickle install sqlsrv

0 commit comments

Comments
 (0)