php fixes

This commit is contained in:
Zimovskii Anatolii 2022-11-13 00:54:37 +03:00
parent 9767cfbd71
commit 85271843d8
Signed by: stam
GPG Key ID: 9911D9EF664EEE14
3 changed files with 11 additions and 226 deletions

View File

@ -36,6 +36,9 @@ jobs:
- name: "Build and Deploy PHP 8.0 Image:" - name: "Build and Deploy PHP 8.0 Image:"
run: cd linux/ecosystem/php/php8.0 && pwd && make build && make deploy run: cd linux/ecosystem/php/php8.0 && pwd && make build && make deploy
- name: "Build and Deploy PHP 8.1 Image:"
run: cd linux/ecosystem/php/php8.1 && pwd && make build && make deploy
################################################################################## ##################################################################################
build-apache2-images: build-apache2-images:
@ -66,6 +69,9 @@ jobs:
- name: "Build and Deploy Apache 2 + PHP 8.0 Image:" - name: "Build and Deploy Apache 2 + PHP 8.0 Image:"
run: cd linux/ecosystem/apache2/php8.0 && pwd && make build && make deploy run: cd linux/ecosystem/apache2/php8.0 && pwd && make build && make deploy
- name: "Build and Deploy Apache 2 + PHP 8.1 Image:"
run: cd linux/ecosystem/apache2/php8.1 && pwd && make build && make deploy
################################################################################## ##################################################################################
build-nginx-images: build-nginx-images:

View File

@ -1,89 +1,3 @@
FROM epicmorg/debian:bullseye-develop AS builder
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ENV BuildDocker true
ARG BUILDS_DIR=/builds
ARG SRC_DIR=${BUILDS_DIR}/src
ARG EXPORT_DIR=${BUILDS_DIR}/export
ARG P4API_DIR=${SRC_DIR}/p4api
ARG P4PHP_DIR=${SRC_DIR}/p4php
ARG MAKE_DIR=${SRC_DIR}/p4php-${PHP_VER}
ARG P4API_VER=r21.1
ARG P4API_URL=http://filehost.perforce.com/perforce/${P4API_VER}/bin.linux26x86_64/p4api.tgz
ARG P4PHP_VER=r20.2
ARG P4PHP_URL=http://filehost.perforce.com/perforce/${P4PHP_VER}/bin.tools/p4php.tgz
ARG PHP_VER=8.0
ARG PHP_MODULE_VER=20200930
ARG PHP_MODULE_PATH=/usr/lib/php/${PHP_MODULE_VER}
##################################################################
# Files and folders
##################################################################
RUN mkdir -p ${BUILDS_DIR} ${SRC_DIR} ${EXPORT_DIR} ${MAKE_DIR} ${P4API_DIR} ${P4PHP_DIR}
##################################################################
# Installing PHP8
##################################################################
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
#Install base packages
RUN apt-get update && \
apt-get install -y --allow-unauthenticated \
libmemcached-dev \
smbclient libsmbclient libsmbclient-dev \
php8.0 \
php8.0-dev \
php8.0-fpm \
php8.0-cli \
php8.0-cgi
##################################################################
# preparing p4src
##################################################################
#RUN wget -qO - ${P4API_URL} | tar -zxv --strip-components=1 -C ${P4API_DIR} && \
# wget -qO - ${P4API_URL} | tar -zxv --strip-components=1 -C ${MAKE_DIR} && \
# wget -qO - ${P4PHP_URL} | tar -zxv --strip-components=1 -C ${P4PHP_DIR} && \
# wget -qO - ${P4PHP_URL} | tar -zxv --strip-components=1 -C ${MAKE_DIR} && \
# cd ${P4API_DIR} && \
# ls -las && \
# cd ${P4PHP_DIR} && \
# ls -las && \
# cd ${MAKE_DIR} && \
# ls -las && \
# cd ${SRC_DIR} && \
# ls -las
##################################################################
# compilling p4src
##################################################################
#RUN cd ${MAKE_DIR} && \
# ls -las && \
# phpize && \
# ./configure --with-perforce=${P4API_DIR} && \
# make && \
# make test && \
# make install && \
# cp ${PHP_MODULE_PATH}/perforce.so ${EXPORT_DIR}
##################################################################
# compilling smbclient
##################################################################
RUN pecl install smbclient && \
cp ${PHP_MODULE_PATH}/smbclient.so ${EXPORT_DIR}
##################################################################
##################################################################
##################################################################
FROM epicmorg/debian:bullseye FROM epicmorg/debian:bullseye
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -143,6 +57,7 @@ RUN apt-get update && \
php8.0-gmagick \ php8.0-gmagick \
php8.0-gnupg \ php8.0-gnupg \
php8.0-redis \ php8.0-redis \
php8.0-smbclient \
smbclient libsmbclient \ smbclient libsmbclient \
php8.0-yaml \ php8.0-yaml \
# php8.0-geoip \ # php8.0-geoip \
@ -222,25 +137,12 @@ RUN apt-get update && \
php -m && \ php -m && \
php -v php -v
##################################################################
# Installing IOnCube addon
#################################################################
ADD https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz /tmp/ioncube.tar.gz
RUN tar -C /tmp -xvf /tmp/ioncube.tar.gz && \
cp /tmp/ioncube/ioncube_loader_lin_8.1.so ${PHP_MODULE_PATH} && \
## echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_8.1.so" >> ${PHP_DIR}/apache2/php.ini && \
echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_8.1.so" >> ${PHP_DIR}/cgi/php.ini && \
echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_8.1.so" >> ${PHP_DIR}/cli/php.ini && \
echo "zend_extension = ${PHP_MODULE_PATH}/ioncube_loader_lin_8.1.so" >> ${PHP_DIR}/fpm/php.ini && \
php -m && \
php -v
################################################################## ##################################################################
# Installing P4 addon # Installing P4 addon
################################################################## ##################################################################
RUN wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80.so && \ RUN wget -q --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80.so --random-wait -O ${PHP_MODULE_PATH}/perforce_php80.so && \
wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.0.2.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80-ssl1.0.2.so && \ wget -q --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.0.2.so --random-wait -O ${PHP_MODULE_PATH}/perforce_php80-ssl1.0.2.so && \
wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.1.1.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80-ssl1.1.1.so wget -q --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.1.1.so --random-wait -O ${PHP_MODULE_PATH}/perforce_php80-ssl1.1.1.so
#COPY --from=builder /builds/export/perforce.so ${PHP_MODULE_PATH} #COPY --from=builder /builds/export/perforce.so ${PHP_MODULE_PATH}
@ -251,17 +153,6 @@ RUN echo "extension = ${PHP_MODULE_PATH}/perforce_php80-ssl1.1.1.so" > ${P4_PHP_
php -m && \ php -m && \
php -v php -v
##################################################################
# Installing smbclient addon
##################################################################
COPY --from=builder /builds/export/smbclient.so ${PHP_MODULE_PATH}
RUN echo "extension = ${PHP_MODULE_PATH}/smbclient.so" > ${SMB_PHP_INI} && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/cgi/conf.d/smbclient.ini && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/cli/conf.d/smbclient.ini && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/fpm/conf.d/smbclient.ini && \
php -m && \
php -v
################################################################## ##################################################################
# Installing Composer addon # Installing Composer addon
################################################################## ##################################################################

View File

@ -1,89 +1,3 @@
FROM epicmorg/debian:bullseye-develop AS builder
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ENV BuildDocker true
ARG BUILDS_DIR=/builds
ARG SRC_DIR=${BUILDS_DIR}/src
ARG EXPORT_DIR=${BUILDS_DIR}/export
ARG P4API_DIR=${SRC_DIR}/p4api
ARG P4PHP_DIR=${SRC_DIR}/p4php
ARG PHP_VER=8.1
ARG MAKE_DIR=${SRC_DIR}/p4php-${PHP_VER}
ARG P4API_VER=r21.1
ARG P4API_URL=http://filehost.perforce.com/perforce/${P4API_VER}/bin.linux26x86_64/p4api.tgz
ARG P4PHP_VER=r20.2
ARG P4PHP_URL=http://filehost.perforce.com/perforce/${P4PHP_VER}/bin.tools/p4php.tgz
ARG PHP_MODULE_VER=20210902
ARG PHP_MODULE_PATH=/usr/lib/php/${PHP_MODULE_VER}
##################################################################
# Files and folders
##################################################################
RUN mkdir -p ${BUILDS_DIR} ${SRC_DIR} ${EXPORT_DIR} ${MAKE_DIR} ${P4API_DIR} ${P4PHP_DIR}
##################################################################
# Installing PHP8.1
##################################################################
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
#Install base packages
RUN apt-get update && \
apt-get install -y --allow-unauthenticated \
libmemcached-dev \
smbclient libsmbclient libsmbclient-dev \
php8.1 \
php8.1-dev \
php8.1-fpm \
php8.1-cli \
php8.1-cgi
##################################################################
# preparing p4src
##################################################################
#RUN wget -qO - ${P4API_URL} | tar -zxv --strip-components=1 -C ${P4API_DIR} && \
# wget -qO - ${P4API_URL} | tar -zxv --strip-components=1 -C ${MAKE_DIR} && \
# wget -qO - ${P4PHP_URL} | tar -zxv --strip-components=1 -C ${P4PHP_DIR} && \
# wget -qO - ${P4PHP_URL} | tar -zxv --strip-components=1 -C ${MAKE_DIR} && \
# cd ${P4API_DIR} && \
# ls -las && \
# cd ${P4PHP_DIR} && \
# ls -las && \
# cd ${MAKE_DIR} && \
# ls -las && \
# cd ${SRC_DIR} && \
# ls -las
##################################################################
# compilling p4src
##################################################################
#RUN cd ${MAKE_DIR} && \
# ls -las && \
# phpize && \
# ./configure --with-perforce=${P4API_DIR} && \
# make && \
# make test && \
# make install && \
# cp ${PHP_MODULE_PATH}/perforce.so ${EXPORT_DIR}
##################################################################
# compilling smbclient
##################################################################
RUN pecl install smbclient && \
cp ${PHP_MODULE_PATH}/smbclient.so ${EXPORT_DIR}
##################################################################
##################################################################
##################################################################
FROM epicmorg/debian:bullseye FROM epicmorg/debian:bullseye
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
@ -143,6 +57,7 @@ RUN apt-get update && \
php8.1-gmagick \ php8.1-gmagick \
php8.1-gnupg \ php8.1-gnupg \
php8.1-redis \ php8.1-redis \
php8.1-smbclient \
smbclient libsmbclient \ smbclient libsmbclient \
php8.1-yaml \ php8.1-yaml \
# php8.1-geoip \ # php8.1-geoip \
@ -235,33 +150,6 @@ RUN tar -C /tmp -xvf /tmp/ioncube.tar.gz && \
php -m && \ php -m && \
php -v php -v
##################################################################
# Installing P4 addon
##################################################################
RUN wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80.so && \
wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.0.2.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80-ssl1.0.2.so && \
wget --no-check-certificate -c http://ftp.perforce.com/perforce/r20.2/bin.linux26x86_64/perforce_php80-ssl1.1.1.so --random-wait -P ${PHP_MODULE_PATH}/perforce_php80-ssl1.1.1.so
#COPY --from=builder /builds/export/perforce.so ${PHP_MODULE_PATH}
RUN echo "extension = ${PHP_MODULE_PATH}/perforce_php80-ssl1.1.1.so" > ${P4_PHP_INI} && \
ln -sf ${P4_PHP_INI} ${PHP_DIR}/cgi/conf.d/perforce.ini && \
ln -sf ${P4_PHP_INI} ${PHP_DIR}/cli/conf.d/perforce.ini && \
ln -sf ${P4_PHP_INI} ${PHP_DIR}/fpm/conf.d/perforce.ini && \
php -m && \
php -v
##################################################################
# Installing smbclient addon
##################################################################
COPY --from=builder /builds/export/smbclient.so ${PHP_MODULE_PATH}
RUN echo "extension = ${PHP_MODULE_PATH}/smbclient.so" > ${SMB_PHP_INI} && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/cgi/conf.d/smbclient.ini && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/cli/conf.d/smbclient.ini && \
ln -sf ${SMB_PHP_INI} ${PHP_DIR}/fpm/conf.d/smbclient.ini && \
php -m && \
php -v
################################################################## ##################################################################
# Installing Composer addon # Installing Composer addon
################################################################## ##################################################################