Changeset View
Changeset View
Standalone View
Standalone View
docker/swoole/Dockerfile
FROM fedora:35 | FROM fedora:37 | ||||
MAINTAINER Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> | MAINTAINER Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> | ||||
ARG SWOOLE_VERSION=v4.11.1 | ARG SWOOLE_VERSION=v5.0.2 | ||||
ENV HOME=/opt/app-root/src | ENV HOME=/opt/app-root/src | ||||
LABEL io.k8s.description="Platform for serving PHP applications under Swoole" \ | LABEL io.k8s.description="Platform for serving PHP applications under Swoole" \ | ||||
io.k8s.display-name="Swoole ${SWOOLE_VERSION}" \ | io.k8s.display-name="Swoole ${SWOOLE_VERSION}" \ | ||||
io.openshift.expose-services="8000:http" \ | io.openshift.expose-services="8000:http" \ | ||||
io.openshift.tags="builder,php,swoole" | io.openshift.tags="builder,php,swoole" | ||||
RUN dnf -y update | RUN dnf -y update | ||||
Show All 10 Lines | RUN dnf -y install \ | ||||
php-common \ | php-common \ | ||||
php-devel \ | php-devel \ | ||||
php-ldap \ | php-ldap \ | ||||
php-opcache \ | php-opcache \ | ||||
php-pecl-apcu \ | php-pecl-apcu \ | ||||
php-mysqlnd \ | php-mysqlnd \ | ||||
re2c \ | re2c \ | ||||
wget && \ | wget && \ | ||||
git clone https://github.com/openswoole/swoole-src.git/ /swoole-src.git/ && \ | git clone https://github.com/swoole/swoole-src.git/ /swoole-src.git/ && \ | ||||
cd /swoole-src.git/ && \ | cd /swoole-src.git/ && \ | ||||
git checkout -f ${SWOOLE_VERSION} && \ | git checkout -f ${SWOOLE_VERSION} && \ | ||||
git clean -d -f -x && \ | git clean -d -f -x && \ | ||||
phpize --clean && \ | phpize --clean && \ | ||||
phpize && \ | phpize && \ | ||||
./configure \ | ./configure \ | ||||
--enable-sockets \ | --enable-sockets \ | ||||
--disable-mysqlnd \ | --disable-mysqlnd \ | ||||
--enable-http2 \ | |||||
--enable-openssl && \ | --enable-openssl && \ | ||||
make -j4 && \ | make -j4 && \ | ||||
make install && \ | make install && \ | ||||
cd / && \ | cd / && \ | ||||
rm -rf /swoole-src.git/ && \ | rm -rf /swoole-src.git/ && \ | ||||
dnf -y remove \ | dnf -y remove \ | ||||
diffutils \ | diffutils \ | ||||
file \ | file \ | ||||
make \ | make \ | ||||
openssl-devel \ | openssl-devel \ | ||||
php-devel \ | php-devel \ | ||||
re2c && \ | re2c && \ | ||||
dnf clean all && \ | dnf clean all && \ | ||||
echo "extension=openswoole.so" >> /etc/php.d/openswoole.ini && \ | echo "extension=swoole.so" >> /etc/php.d/swoole.ini && \ | ||||
php -m 2>&1 | grep -q openswoole | php -m 2>&1 | grep -q swoole | ||||
RUN id default || (groupadd -g 1001 default && useradd -d /opt/app-root/ -u 1001 -g 1001 default) | RUN id default || (groupadd -g 1001 default && useradd -d /opt/app-root/ -u 1001 -g 1001 default) | ||||
USER 1001 | USER 1001 | ||||
WORKDIR ${HOME} | WORKDIR ${HOME} | ||||
COPY /rootfs / | COPY /rootfs / | ||||
EXPOSE 8000 | EXPOSE 8000 | ||||
CMD [ "/usr/local/bin/usage" ] | CMD [ "/usr/local/bin/usage" ] |