Removed unecessary packages for almalinux based
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:almalinux os_short_version:9 os_version:9.5 php_major:true php_release:8 php_version:8.4]) (push) Successful in 11m8s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:alpine os_label:true os_version:3.21 php_major:true php_release:8 php_short_version:84 php_version:8.4]) (push) Successful in 1m35s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:8 os_version:8.10 php_release:7 php_version:7.2]) (push) Successful in 3m59s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:8 os_version:8.10 php_release:7 php_version:7.3]) (push) Successful in 3m51s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:7 php_version:7.4]) (push) Successful in 4m17s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.0]) (push) Successful in 4m38s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.1]) (push) Successful in 4m2s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.2]) (push) Successful in 4m0s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.3]) (push) Successful in 4m30s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.12 php_release:7 php_short_version:7 php_version:7.3]) (push) Successful in 1m59s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.15 php_major:true php_release:7 php_short_version:7 php_version:7.4]) (push) Successful in 2m18s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.16 php_release:8 php_short_version:8 php_version:8.0]) (push) Successful in 1m43s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.19 php_release:8 php_short_version:81 php_version:8.1]) (push) Successful in 1m23s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.21 php_release:8 php_short_version:82 php_version:8.2]) (push) Successful in 1m53s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.21 php_release:8 php_short_version:83 php_version:8.3]) (push) Successful in 1m47s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.9 php_release:7 php_short_version:7 php_version:7.2]) (push) Successful in 1m56s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:almalinux os_short_version:9 os_version:9.5 php_major:true php_release:8 php_version:8.4]) (push) Successful in 11m8s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:alpine os_label:true os_version:3.21 php_major:true php_release:8 php_short_version:84 php_version:8.4]) (push) Successful in 1m35s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:8 os_version:8.10 php_release:7 php_version:7.2]) (push) Successful in 3m59s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:8 os_version:8.10 php_release:7 php_version:7.3]) (push) Successful in 3m51s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:7 php_version:7.4]) (push) Successful in 4m17s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.0]) (push) Successful in 4m38s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.1]) (push) Successful in 4m2s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.2]) (push) Successful in 4m0s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:almalinux os_short_version:9 os_version:9.5 php_release:8 php_version:8.3]) (push) Successful in 4m30s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.12 php_release:7 php_short_version:7 php_version:7.3]) (push) Successful in 1m59s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.15 php_major:true php_release:7 php_short_version:7 php_version:7.4]) (push) Successful in 2m18s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.16 php_release:8 php_short_version:8 php_version:8.0]) (push) Successful in 1m43s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.19 php_release:8 php_short_version:81 php_version:8.1]) (push) Successful in 1m23s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.21 php_release:8 php_short_version:82 php_version:8.2]) (push) Successful in 1m53s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.21 php_release:8 php_short_version:83 php_version:8.3]) (push) Successful in 1m47s
Details
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 os:alpine os_label:true os_version:3.9 php_release:7 php_short_version:7 php_version:7.2]) (push) Successful in 1m56s
Details
This commit is contained in:
parent
823db63851
commit
4bd36712bc
|
@ -5,12 +5,15 @@ FROM quay.io/teras/almalinux:${OS_VERSION}-minimal AS builder
|
||||||
ARG OS_SHORT_VERSION=9
|
ARG OS_SHORT_VERSION=9
|
||||||
ARG PHP_VERSION=8.4
|
ARG PHP_VERSION=8.4
|
||||||
ARG COMPOSER_VERSION=2.8.9
|
ARG COMPOSER_VERSION=2.8.9
|
||||||
|
ARG WEB_SERVER=false
|
||||||
|
|
||||||
ENV PHP_VERSION=${PHP_VERSION}
|
ENV PHP_VERSION=${PHP_VERSION}
|
||||||
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
||||||
ENV SERVER_ROOT=/app
|
ENV SERVER_ROOT=/app
|
||||||
|
ENV APP_ROOT=${SERVER_ROOT}/htdocs
|
||||||
|
ENV WEB_SERVER=${WEB_SERVER}
|
||||||
|
|
||||||
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
|
ENV COMPOSER_HOME=/var/lib/composer
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=0
|
ENV COMPOSER_ALLOW_SUPERUSER=0
|
||||||
ENV COMPOSER_NO_INTERACTION=1
|
ENV COMPOSER_NO_INTERACTION=1
|
||||||
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
|
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
|
||||||
|
@ -21,6 +24,7 @@ USER root
|
||||||
WORKDIR ${SERVER_ROOT}
|
WORKDIR ${SERVER_ROOT}
|
||||||
|
|
||||||
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
|
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
|
||||||
|
ADD ./htdocs/index.html ${APP_ROOT}/
|
||||||
|
|
||||||
RUN /bin/mkdir -p ${COMPOSER_CACHE_DIR} ${COMPOSER_VENDOR_DIR} ${COMPOSER_BIN_DIR}; \
|
RUN /bin/mkdir -p ${COMPOSER_CACHE_DIR} ${COMPOSER_VENDOR_DIR} ${COMPOSER_BIN_DIR}; \
|
||||||
/bin/chown -R appuser:appuser ${COMPOSER_HOME}; \
|
/bin/chown -R appuser:appuser ${COMPOSER_HOME}; \
|
||||||
|
@ -34,6 +38,41 @@ RUN /bin/mkdir -p ${COMPOSER_CACHE_DIR} ${COMPOSER_VENDOR_DIR} ${COMPOSER_BIN_DI
|
||||||
php php-cli php-common php-phar \
|
php php-cli php-common php-phar \
|
||||||
php-iconv php-mbstring php-json; \
|
php-iconv php-mbstring php-json; \
|
||||||
/bin/chmod +rx /usr/local/bin/composer; \
|
/bin/chmod +rx /usr/local/bin/composer; \
|
||||||
|
/bin/sed -i "s|#version#|${PHP_VERSION}}|" ${APP_ROOT}/index.html ;
|
||||||
|
|
||||||
|
# Run if httpd is being installed, otherwise remove all packages related to it
|
||||||
|
RUN if [ ${WEB_SERVER} = "apache" ]; then \
|
||||||
|
/bin/mkdir -p ${SERVER_ROOT}/cgi-bin; \
|
||||||
|
/bin/chown -R appuser:appuser ${SERVER_ROOT}/cgi-bin; \
|
||||||
|
/bin/chown -R appuser:appuser /etc/httpd \
|
||||||
|
/bin/sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|User apache|User appuser|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|Group httpd|Group appuser|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|ServerAdmin root@localhost| ServerAdmin appuser@localhost|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|DocumentRoot \"/var/www\"|DocumentRoot \"${SERVER_ROOT}\"|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|DocumentRoot \"/var/www/html\"|DocumentRoot \"${APP_ROOT}\"|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|Directory \"/var/www/html\"|Directory \"${APP_ROOT}\"|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|AllowOverride None|AllowOverride All|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
/bin/sed -i "s|/var/www/cgi-bin/|${SERVER_ROOT}/cgi-bin/|" /etc/httpd/conf/httpd.conf ; \
|
||||||
|
else \
|
||||||
|
/bin/rpm -e --nodeps $(rpm -qa | grep ^httpd) php-fpm; \
|
||||||
|
/bin/rm -rf /etc/httpd; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run if nginx is being installed otherwise remove all packages related to it
|
||||||
|
RUN if [ ${WEB_SERVER} = "fpm-nginx" ]; then \
|
||||||
|
/bin/microdnf -y --nodocs install nginx php-fpm; \
|
||||||
|
else \
|
||||||
|
/bin/rpm -e --nodeps $(rpm -qa | grep ^nginx); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove unnecessary packages and clean up all cached files
|
||||||
|
RUN rpm -e --nodeps python-unversioned-command $(rpm -qa | grep ^python3) ; \
|
||||||
|
rm -rf /usr/lib/python3* /usr/lib64/python3* /usr/share/doc/python3* /usr/share/man/man1/python3* ; \
|
||||||
/bin/microdnf clean all; \
|
/bin/microdnf clean all; \
|
||||||
/bin/rm -rf /var/cache/yum/*; \
|
/bin/rm -rf /var/cache/yum/*; \
|
||||||
/bin/rm -rf /var/lib/yum/history/*; \
|
/bin/rm -rf /var/lib/yum/history/*; \
|
||||||
|
@ -54,6 +93,7 @@ ENV LANG=en_US.UTF-8
|
||||||
ENV PHP_VERSION=${PHP_VERSION}
|
ENV PHP_VERSION=${PHP_VERSION}
|
||||||
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
||||||
ENV SERVER_ROOT=/app
|
ENV SERVER_ROOT=/app
|
||||||
|
ENV APP_ROOT=${SERVER_ROOT}/htdocs
|
||||||
|
|
||||||
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
|
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=0
|
ENV COMPOSER_ALLOW_SUPERUSER=0
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
# PHP 5.6 == 3.6
|
||||||
|
# PHP 7.2 == 3.9
|
||||||
|
# PHP 7.3 == 3.12
|
||||||
|
# PHP 7.4 == 3.15
|
||||||
# PHP 8.0 == 3.16
|
# PHP 8.0 == 3.16
|
||||||
# PHP 8.1 == 3.19
|
# PHP 8.1 == 3.19
|
||||||
# PHP 8.2 == 3.21
|
# PHP 8.2 == 3.21
|
||||||
|
@ -20,7 +24,7 @@ ENV PHP_VERSION=${PHP_VERSION}
|
||||||
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
|
||||||
ENV SERVER_ROOT=/app
|
ENV SERVER_ROOT=/app
|
||||||
|
|
||||||
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
|
ENV COMPOSER_HOME=/var/lib/composer
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=0
|
ENV COMPOSER_ALLOW_SUPERUSER=0
|
||||||
ENV COMPOSER_NO_INTERACTION=1
|
ENV COMPOSER_NO_INTERACTION=1
|
||||||
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
|
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Welcome to httpd!</h1>
|
<h1>Welcome to httpd!</h1>
|
||||||
<h2>The sindigilive/php:#version#-apache--#os# variant.</h2>
|
<h2>The teras/php:#version#-apache variant.</h2>
|
||||||
<p>If you see this page, the nginx web server is successfully installed and
|
<p>If you see this page, the nginx web server is successfully installed and
|
||||||
working. Further configuration is required.</p>
|
working. Further configuration is required.</p>
|
||||||
|
|
||||||
<p>For online documentation and support please refer to
|
<p>For online documentation and support please refer to
|
||||||
<a href="https://httpd.apache.org/">httpd.apache.org</a>.</p>
|
<a href="https://httpd.apache.org/">httpd.apache.org</a>.</p>
|
||||||
|
|
||||||
<p>For online documentation specific to the sindigilive/php:#version#-apache-#flavor#-#os# variant,<br/>
|
<p>For online documentation specific to the teras/php:#version#-apache variant,<br/>
|
||||||
please refer to <a href="https://github.com/aprimediet/docker-php">sindigilive/php</a>.</p>
|
please refer to <a href="https://github.com/aprimediet/docker-php">teras/php</a>.</p>
|
||||||
|
|
||||||
<p><em>Thank you for using httpd.</em></p>
|
<p><em>Thank you for using httpd.</em></p>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue