Compare commits

...

49 Commits

Author SHA1 Message Date
Muhamad Aditya Prima 4bd36712bc 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
2025-05-25 16:04:50 +07:00
Muhamad Aditya Prima 823db63851 Updated action workflows
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 7m53s 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 1m33s 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 5m36s 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 6m15s 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 6m22s 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 6m9s 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 7m17s 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 11m4s 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 4m36s 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 1m1s 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 1m14s 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 1m6s 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 1m8s 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 1m2s 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 1m11s 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 1m1s Details
2025-05-23 10:36:49 +07:00
Muhamad Aditya Prima 6de9d22ec1 Updated action workflows
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_major:true php_release:8 php_version:8.4]) (push) Successful in 3m11s 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 1m34s Details
2025-05-23 09:28:43 +07:00
Muhamad Aditya Prima aa52ec63f6 Updated action workflows
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_major:true php_release:8 php_version:8.4]) (push) Successful in 3m54s 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_major:true php_release:8 php_short_version:84 php_version:8.4]) (push) Successful in 1m7s Details
2025-05-23 09:17:23 +07:00
Muhamad Aditya Prima e6e1d3029f Updated almalinux and alpine base image, testing at php 8.4 images
Build and push PHP container images / Build php cli with composer (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_major:true php_release:8 php_version:8.4]) (push) Successful in 3m10s 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:84 php_version:8.4]) (push) Successful in 55s Details
2025-05-23 02:02:11 +07:00
Muhamad Aditya Prima e9269a86ad Merge branch 'php-almalinux' 2025-05-21 15:19:09 +07:00
Muhamad Aditya Prima d9913c0bbf Merge branch 'php8-alpine' 2025-05-21 15:19:05 +07:00
Muhamad Aditya Prima f4f5c04541 Merge branch 'php8-almalinux' 2025-05-21 15:19:02 +07:00
Muhamad Aditya Prima 7e7a383f73 Merge branch 'php5-alpine'
# Conflicts:
#	7/Dockerfile.alpine-apache
#	7/Dockerfile.alpine-builder
2025-05-21 15:18:47 +07:00
Muhamad Aditya Prima be8d7852e7 Fixed missing os name
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_version:8.4]) (push) Successful in 14m29s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:8.10 php_version:7.2]) (push) Successful in 8m18s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:8.10 php_version:7.3]) (push) Successful in 8m54s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:8.10 php_version:7.4]) (push) Successful in 5m17s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.0]) (push) Successful in 2m44s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.1]) (push) Successful in 2m24s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.2]) (push) Successful in 2m21s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.3]) (push) Successful in 2m19s Details
2025-05-21 13:11:53 +07:00
Muhamad Aditya Prima 71732fdead Changed php7 and php8 build as one branch
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 latest:true os_version:9.5 php_version:8.4]) (push) Failing after 32s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:8.10 php_version:7.2]) (push) Failing after 27s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:8.10 php_version:7.3]) (push) Failing after 29s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:8.10 php_version:7.4]) (push) Failing after 28s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:9.5 php_version:8.0]) (push) Failing after 29s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:9.5 php_version:8.1]) (push) Failing after 29s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:9.5 php_version:8.2]) (push) Failing after 31s Details
Build and push PHP based on almalinux / Build php8-almalinux (map[composer_version:2.8.9 os_version:9.5 php_version:8.3]) (push) Failing after 27s Details
2025-05-21 03:15:42 +07:00
Muhamad Aditya Prima 89a96c6b2c Added php 8.0 to 8.3 versions
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_version:8.4]) (push) Successful in 2m36s Details
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.0]) (push) Successful in 2m28s Details
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.1]) (push) Successful in 2m30s Details
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.2]) (push) Successful in 2m25s Details
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.3]) (push) Successful in 2m29s Details
2025-05-20 16:40:16 +07:00
Muhamad Aditya Prima 0e0a416cb9 Updated action workflows
Build and push PHP 8 container images / Build php8-almalinux (map[composer_version:2.8.9 latest:true os:almalinux os_version:9.5 php_version:8.4]) (push) Successful in 2m37s Details
2025-05-20 16:30:04 +07:00
Muhamad Aditya Prima 54ef426c57 Added php-cli with almalinux-minimal base image
Build and push PHP 8 container images / Build PHP 8 container images (map[composer_version:2.8.9 os:almalinux os_version:9.5 php_version:8.4]) (push) Successful in 2m49s Details
Build and push PHP 8 container images / Build PHP 8 container images (push) Has been cancelled Details
2025-05-20 16:23:40 +07:00
Muhamad Aditya Prima 1376b21230 added image with apache and build all flavor
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0]) (push) Successful in 50s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1]) (push) Successful in 48s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.2]) (push) Successful in 59s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3]) (push) Successful in 41s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0 with_database:false with_server:apache]) (push) Successful in 1m6s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0 with_database:false with_server:false]) (push) Successful in 49s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0 with_database:mysql with_server:apache]) (push) Successful in 1m4s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0 with_database:postgresql with_server:apache]) (push) Successful in 56s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1 with_database:false with_server:apache]) (push) Successful in 1m3s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1 with_database:false with_server:false]) (push) Successful in 1m4s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1 with_database:mysql with_server:apache]) (push) Successful in 55s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1 with_database:postgresql with_server:apache]) (push) Successful in 54s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:82 php_version:8.2 with_database:false with_server:apache]) (push) Successful in 1m1s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:82 php_version:8.2 with_database:false with_server:false]) (push) Successful in 46s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:82 php_version:8.2 with_database:mysql with_server:apache]) (push) Successful in 57s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:82 php_version:8.2 with_database:postgresql with_server:apache]) (push) Successful in 55s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3 with_database:false with_server:apache]) (push) Successful in 1m2s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3 with_database:false with_server:false]) (push) Successful in 57s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3 with_database:mysql with_server:apache]) (push) Successful in 54s Details
Build and push PHP 8 container images / Build PHP 8 container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3 with_database:postgresql with_server:apache]) (push) Successful in 51s Details
2024-12-27 19:17:23 +07:00
Muhamad Aditya Prima 7728b1a728 Added php8-alpine
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.16 php_ver_short:8 php_version:8.0]) (push) Successful in 1m5s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.19 php_ver_short:81 php_version:8.1]) (push) Successful in 56s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.2]) (push) Successful in 52s Details
Build and push PHP 8 container images / Build PHP 8 builder container images (map[os:alpine os_version:3.21 php_ver_short:83 php_version:8.3]) (push) Successful in 42s Details
2024-12-27 19:04:32 +07:00
Muhamad Aditya Prima 58c1b67a91 Updated apache dockerfile 2024-12-27 18:50:02 +07:00
Muhamad Aditya Prima 5b7c2520ea fixed apache dockerfile 2024-12-27 15:22:50 +07:00
Muhamad Aditya Prima 595a49aa10 Fixed missing read permission on all scripts 2024-12-27 15:22:50 +07:00
Muhamad Aditya Prima edcb233a46 Updated alpine-setup.sh 2024-12-27 14:55:56 +07:00
Muhamad Aditya Prima 3db317a682 Updated php7 dockerfile and workflows 2024-12-27 14:47:15 +07:00
Muhamad Aditya Prima f9a47ed3a9 Updated builder setup 2024-12-27 14:47:15 +07:00
Muhamad Aditya Prima 5554649963 Added builder image for all build 2024-12-27 14:47:15 +07:00
Muhamad Aditya Prima 4e294414b8 Updated apache alpine dockerfile 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 5a39b19d12 Fixed docker command on php 7 apache 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 5d1d47aa7e Fixed entrypoint permission 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima e8af87d5b3 Added user php with uid 10000 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 4fa3d87ffe Removed debug flavor 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 57efb4a31b Added missing iconv and mbstring for composer to run 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima f83c5460f2 Fixed wrong chmod compsoer command 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 587a5430f3 Added php 7.2 and 7.3 flavor 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 2577409c2f Added composer for all php7 image 2024-12-27 14:47:14 +07:00
Muhamad Aditya Prima 1213c4f47a Updated php7 dockerfile and workflows 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima ec6be2f286 Updated builder setup 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima 95d5a2feee Added builder image for all build 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima 638f4af575 Updated apache alpine dockerfile 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima b1a69912fe Fixed docker command on php 7 apache 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima ddeb4e058e Fixed entrypoint permission 2024-12-27 14:38:16 +07:00
Muhamad Aditya Prima 3d4a2537b1 Added user php with uid 10000 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima 8cd2e3e04b Removed debug flavor 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima 8e66514189 Added missing iconv and mbstring for composer to run 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima c61bbd0775 Fixed wrong chmod compsoer command 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima 0c1f193aaf Added php 7.2 and 7.3 flavor 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima b40a6b9038 Added composer for all php7 image 2024-12-27 14:38:15 +07:00
Muhamad Aditya Prima d12dee4fce Composer now available on all images
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:cli os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:false with_server:false]) (push) Successful in 51s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:debug os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:false with_server:apache]) (push) Successful in 1m26s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:debug os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:false with_server:false]) (push) Successful in 1m22s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:debug os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:mysql with_server:apache]) (push) Successful in 1m30s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:debug os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:postgresql with_server:apache]) (push) Successful in 1m32s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:false with_server:apache]) (push) Successful in 1m20s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:false with_server:false]) (push) Successful in 1m9s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:mysql with_server:apache]) (push) Successful in 1m18s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:alpine os_version:3.6 php_ver_short:5 php_version:5.6 with_database:postgresql with_server:apache]) (push) Successful in 1m24s Details
2024-12-18 01:49:00 +07:00
Muhamad Aditya Prima 79741d89b9 Removed separate php5-composer build, will integrate on all flavors build 2024-12-18 00:51:10 +07:00
Muhamad Aditya Prima b077028183 Merge branch 'php7-alpine' 2024-12-18 00:49:58 +07:00
Muhamad Aditya Prima a70753bfa0 Added php5.6 debug support on almalinux
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:cli os:almalinux os_version:8.10 php_ver_short:56 php_version:5.6 with_database:false with_server:false]) (push) Successful in 6m8s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:debug os:almalinux os_version:8.10 php_ver_short:56 php_version:5.6 with_database:false with_server:false]) (push) Failing after 32s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:almalinux os_version:8.10 php_ver_short:56 php_version:5.6 with_database:false with_server:false]) (push) Successful in 4m31s Details
2024-12-17 12:35:57 +07:00
Muhamad Aditya Prima 01a7842d5a Added php5.6 full package with almalinux8-micro
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:cli os:almalinux os_version:8.10 php_ver_short:56 php_version:5.6 with_database:false with_server:false]) (push) Successful in 3m10s Details
Build and push PHP 5 container images / Build PHP 5 container images (map[mode:full os:almalinux os_version:8.10 php_ver_short:56 php_version:5.6 with_database:false with_server:false]) (push) Successful in 4m46s Details
2024-12-17 02:50:23 +07:00
33 changed files with 1097 additions and 780 deletions

View File

@ -0,0 +1,225 @@
name: Build and push PHP container images
on:
push:
branches:
- master
jobs:
base:
name: Build php cli with composer
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
strategy:
matrix:
params:
- os: "alpine"
os_version: "3.9"
os_label: "true"
php_version: "7.2"
php_short_version: "7"
php_release: "7"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.12"
os_label: "true"
php_version: "7.3"
php_short_version: "7"
php_release: "7"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.15"
os_label: "true"
php_version: "7.4"
php_short_version: "7"
php_release: "7"
php_major: 'true'
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.16"
os_label: "true"
php_version: "8.0"
php_short_version: "8"
php_release: "8"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.19"
os_label: "true"
php_version: "8.1"
php_short_version: "81"
php_release: "8"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.21"
os_label: "true"
php_version: "8.2"
php_short_version: "82"
php_release: "8"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.21"
os_label: "true"
php_version: "8.3"
php_short_version: "83"
php_release: "8"
composer_version: "2.8.9"
- os: "alpine"
os_version: "3.21"
os_label: "true"
php_version: "8.4"
php_short_version: "84"
php_release: "8"
php_major: 'true'
composer_version: "2.8.9"
latest: 'true'
- os: "almalinux"
os_version: "8.10"
os_short_version: "8"
php_version: "7.2"
php_release: "7"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "8.10"
os_short_version: "8"
php_version: "7.3"
php_release: "7"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "7.4"
php_release: "7"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "8.0"
php_release: "8"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "8.1"
php_release: "8"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "8.2"
php_release: "8"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "8.3"
php_release: "8"
composer_version: "2.8.9"
- os: "almalinux"
os_version: "9.5"
os_short_version: "9"
php_version: "8.4"
php_release: "8"
php_major: 'true'
composer_version: "2.8.9"
latest: 'true'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- if: ${{ matrix.params.os_label != 'true' }}
name: Build and push php release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:${{ matrix.params.php_version }}
- if: ${{ matrix.params.os_label == 'true' }}
name: Build and push php release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:${{ matrix.params.php_version }}-${{ matrix.params.os }}
- if: ${{ matrix.params.php_major == 'true' && matrix.params.os_label != 'true' }}
name: Build and push php major release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:${{ matrix.params.php_release }}
- if: ${{ matrix.params.php_major == 'true' && matrix.params.os_label == 'true' }}
name: Build and push php major release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:${{ matrix.params.php_release }}-${{ matrix.params.os }}
- if: ${{ matrix.params.latest == 'true' && matrix.params.os_label != 'true' }}
name: Build and push latest release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:latest
- if: ${{ matrix.params.latest == 'true' && matrix.params.os_label == 'true' }}
name: Build and push latest release
uses: docker/build-push-action@v5
with:
push: true
context: .
file: Dockerfile.${{ matrix.params.os }}
build-args: |
OS_VERSION=${{ matrix.params.os_version }}
OS_SHORT_VERSION=${{ matirx.params.os_short_version }}
PHP_VERSION=${{ matrix.params.php_version }}
PHP_SHORT_VERSION=${{ matrix.params.php_short_version }}
COMPOSER_VERSION=${{ matrix.params.composer_version }}
tags: |
quay.io/teras/php:latest-${{ matrix.params.os }}

View File

@ -1,111 +0,0 @@
name: Build and push PHP 5 container images
on:
push:
branches:
- php5-almalinux
jobs:
build:
name: Build PHP 5 container images
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
strategy:
matrix:
flavors:
- os: "almalinux"
os_version: "8.10"
php_version: "5.6"
php_ver_short: "56"
mode: cli
with_server: "false"
with_database: "false"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- if: ${{ matrix.flavors.with_server == 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php5
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.mode }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php5 with webserver
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database != 'false' }}
name: Build and push php5 with apache2 and database connector library
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
WITH_DATABASE=${{ matrix.flavors.with_database }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.with_database }}-${{ matrix.flavors.os }}
# build-latest:
# name: Build latest nginx alpine based container images
# runs-on: ubuntu-latest
# needs:
# - build
# container:
# image: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - name: Login to quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ vars.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_SECRET }}
# # - name: Set up QEMU
# # uses: docker/setup-qemu-action@v3
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push latest nginx
# uses: docker/build-push-action@v5
# with:
# # platforms: linux/amd64,linux/arm64
# push: true
# context: .
# file: Dockerfile.alpine
# tags: |
# quay.io/sindigilive/nginx:alpine
# quay.io/sindigilive/nginx:latest

View File

@ -1,167 +0,0 @@
name: Build and push PHP 5 container images
on:
push:
branches:
- php5-alpine
jobs:
build:
name: Build PHP 5 container images
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
strategy:
matrix:
flavors:
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: cli
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: full
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: debug
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: full
with_server: "apache"
with_database: "false"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: full
with_server: "apache"
with_database: "mysql"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: full
with_server: "apache"
with_database: "postgresql"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: debug
with_server: "apache"
with_database: "false"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: debug
with_server: "apache"
with_database: "mysql"
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
mode: debug
with_server: "apache"
with_database: "postgresql"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- if: ${{ matrix.flavors.with_server == 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php5
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php5 with webserver
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database != 'false' }}
name: Build and push php5 with apache2 and database connector library
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
WITH_DATABASE=${{ matrix.flavors.with_database }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.with_database }}-${{ matrix.flavors.os }}
# build-latest:
# name: Build latest nginx alpine based container images
# runs-on: ubuntu-latest
# needs:
# - build
# container:
# image: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - name: Login to quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ vars.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_SECRET }}
# # - name: Set up QEMU
# # uses: docker/setup-qemu-action@v3
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push latest nginx
# uses: docker/build-push-action@v5
# with:
# # platforms: linux/amd64,linux/arm64
# push: true
# context: .
# file: Dockerfile.alpine
# tags: |
# quay.io/sindigilive/nginx:alpine
# quay.io/sindigilive/nginx:latest

View File

@ -1,80 +0,0 @@
name: Build and push PHP 5 container images
on:
push:
branches:
- php5-composer
jobs:
build:
name: Build PHP 5 container images
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
strategy:
matrix:
flavors:
- os: "alpine"
os_version: "3.6"
php_version: "5.6"
php_ver_short: "5"
composer_version: "2.2.25"
composer_ver_short: "2.2"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and push php5 with composer
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 5/Dockerfile.composer-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
COMPOSER_VERSION=${{ matrix.flavors.composer_version }}
COMPOSER_VER_SHORT=${{ matrix.flavors.composer_ver_short }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-composer${{ matrix.flavors.composer_ver_short }}-${{ matrix.flavors.os }}
# build-latest:
# name: Build latest nginx alpine based container images
# runs-on: ubuntu-latest
# needs:
# - build
# container:
# image: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - name: Login to quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ vars.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_SECRET }}
# # - name: Set up QEMU
# # uses: docker/setup-qemu-action@v3
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push latest nginx
# uses: docker/build-push-action@v5
# with:
# # platforms: linux/amd64,linux/arm64
# push: true
# context: .
# file: Dockerfile.alpine
# tags: |
# quay.io/sindigilive/nginx:alpine
# quay.io/sindigilive/nginx:latest

View File

@ -1,167 +0,0 @@
name: Build and push PHP 7 container images
on:
push:
branches:
- php7-alpine
jobs:
build:
name: Build PHP 7 container images
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
strategy:
matrix:
flavors:
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: cli
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: full
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: debug
with_server: "false"
with_database: "false"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: full
with_server: "apache"
with_database: "false"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: full
with_server: "apache"
with_database: "mysql"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: full
with_server: "apache"
with_database: "postgresql"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: debug
with_server: "apache"
with_database: "false"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: debug
with_server: "apache"
with_database: "mysql"
- os: "alpine"
os_version: "3.15"
php_version: "7.4"
php_ver_short: "7"
mode: debug
with_server: "apache"
with_database: "postgresql"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- if: ${{ matrix.flavors.with_server == 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php7
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 7/Dockerfile.${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database == 'false' }}
name: Build and push php7 with webserver
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 7/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
- if: ${{ matrix.flavors.with_server != 'false' && matrix.flavors.with_database != 'false' }}
name: Build and push php7 with apache2 and database connector library
uses: docker/build-push-action@v5
with:
push: true
context: .
file: 7/Dockerfile.${{ matrix.flavors.with_server }}-${{ matrix.flavors.os }}
build-args: |
OS_VERSION=${{ matrix.flavors.os_version }}
FLAVOR=${{ matrix.flavors.mode }}
PHP_VERSION=${{ matrix.flavors.php_version }}
PHP_VER_SHORT=${{ matrix.flavors.php_ver_short }}
WITH_APACHE=true
WITH_DATABASE=${{ matrix.flavors.with_database }}
tags: |
quay.io/sindigilive/php:${{ matrix.flavors.php_version }}-${{ matrix.flavors.mode }}-${{ matrix.flavors.with_server }}-${{ matrix.flavors.with_database }}-${{ matrix.flavors.os }}
# build-latest:
# name: Build latest nginx alpine based container images
# runs-on: ubuntu-latest
# needs:
# - build
# container:
# image: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - name: Login to quay.io
# uses: docker/login-action@v3
# with:
# registry: quay.io
# username: ${{ vars.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_SECRET }}
# # - name: Set up QEMU
# # uses: docker/setup-qemu-action@v3
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push latest nginx
# uses: docker/build-push-action@v5
# with:
# # platforms: linux/amd64,linux/arm64
# push: true
# context: .
# file: Dockerfile.alpine
# tags: |
# quay.io/sindigilive/nginx:alpine
# quay.io/sindigilive/nginx:latest

View File

@ -6,24 +6,42 @@ LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
ARG FLAVOR=cli
ARG WITH_APACHE=false
ARG WITH_DATABASE=false
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=5
ARG COMPOSER_VERSION=2.2.25
ARG COMPOSER_VER_SHORT=2.2
ENV FLAVOR=${FLAVOR}
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV COMPOSER_VER_SHORT=${COMPOSER_VER_SHORT}
WORKDIR /root
# Set composer home
ENV COMPOSER_HOME=/app
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
ADD 5/scripts/alpine-setup.sh /tmp/setup.sh
WORKDIR /tmp
ADD 5/scripts/alpine-setup.sh ./setup.sh
# Download and install composer
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
# Create directory, and install required php app
RUN /bin/mkdir -p /app ; \
RUN /bin/mkdir -p ${COMPOSER_HOME}/build ${COMPOSER_CACHE_DIR}/files \
${COMPOSER_CACHE_DIR}/repo ${COMPOSER_CACHE_DIR}/vcs ; \
/app ; \
/usr/sbin/addgroup -g 10001 php ; \
/usr/sbin/adduser -D -u 10001 -G php -s /sbin/nologin -h ${COMPOSER_HOME}/build php ; \
/bin/mkdir -p /app ; \
/sbin/apk add --update --no-cache \
php${PHP_VER_SHORT} php${PHP_VER_SHORT}-common \
php${PHP_VER_SHORT}-cli ; \
/bin/chmod +x /tmp/setup.sh; \
php${PHP_VER_SHORT}-cli php${PHP_VER_SHORT}-phar ; \
/bin/chmod +x /tmp/setup.sh /usr/local/bin/composer ; \
/bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh;

View File

@ -12,20 +12,23 @@ ENV WITH_APACHE=${WITH_APACHE}
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
ENV ROOTFS=/mnt/rootfs
WORKDIR /tmp
RUN mkdir -p /mnt/rootfs; \
RUN mkdir -p ${ROOTFS}; \
dnf -y update; \
dnf install http://rpms.remirepo.net/enterprise/remi-release-8.rpm \
--releasever 8 --setopt install_weak_deps=false --nodocs -y; \
dnf install --installroot ${ROOTFS} \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y; \
dnf module reset php; \
dnf install --installroot /mnt/rootfs \
dnf install --installroot ${ROOTFS} \
coreutils-single \
glibc-minimal-langpack \
php${PHP_VER_SHORT}-php-cli \
php${PHP_VER_SHORT}-php-common \
--releasever 8 --setopt install_weak_deps=false --nodocs -y; \
dnf --installroot /mnt/rootfs clean all;
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y; \
dnf --installroot ${ROOTFS} clean all;
FROM quay.io/sindigilive/almalinux:${OS_VERSION}-micro AS stage2
@ -33,65 +36,48 @@ ARG PHP_VER_SHORT=56
RUN mkdir -p /app;
ENV ROOTFS=/mnt/rootfs
ENV SRC=${ROOTFS}/usr/lib64
COPY --from=builder \
/mnt/rootfs/usr/lib64/libcrypt.so.1 \
/mnt/rootfs/usr/lib64/libedit.so.0 \
/mnt/rootfs/usr/lib64/libstdc++.so.6 \
/mnt/rootfs/usr/lib64/libz.so.1 \
/mnt/rootfs/usr/lib64/libpcre.so.1 \
/mnt/rootfs/usr/lib64/libxml2.so.2 \
/mnt/rootfs/usr/lib64/liblzma.so.5 \
/mnt/rootfs/usr/lib64/libgssapi_krb5.so.2 \
/mnt/rootfs/usr/lib64/libkrb5.so.3 \
/mnt/rootfs/usr/lib64/libk5crypto.so.3 \
/mnt/rootfs/usr/lib64/libcom_err.so.2 \
/mnt/rootfs/usr/lib64/libssl.so.1.1 \
/mnt/rootfs/usr/lib64/libcrypto.so.1.1 \
/mnt/rootfs/usr/lib64/libkrb5support.so.0 \
/mnt/rootfs/usr/lib64/libkeyutils.so.1 \
/mnt/rootfs/usr/lib64/libbz2.so.1 \
/mnt/rootfs/usr/lib64/libcurl.so.4 \
/mnt/rootfs/usr/lib64/libbz2.so.1 \
/mnt/rootfs/usr/lib64/libnghttp2.so.14 \
/mnt/rootfs/usr/lib64/libzstd.so.1 \
/mnt/rootfs/usr/lib64/libidn2.so.0 \
/mnt/rootfs/usr/lib64/libssh.so.4 \
/mnt/rootfs/usr/lib64/libpsl.so.5 \
/mnt/rootfs/usr/lib64/libldap-2.4.so.2 \
/mnt/rootfs/usr/lib64/liblber-2.4.so.2 \
/mnt/rootfs/usr/lib64/libbrotlidec.so.1 \
/mnt/rootfs/usr/lib64/libunistring.so.2 \
/mnt/rootfs/usr/lib64/libsasl2.so.3 \
/mnt/rootfs/usr/lib64/libbrotlicommon.so.1 \
${SRC}/libcrypt.so.1 ${SRC}/libedit.so.0 ${SRC}/libstdc++.so.6 \
${SRC}/libz.so.1 ${SRC}/libpcre.so.1 ${SRC}/libxml2.so.2 \
${SRC}/liblzma.so.5 ${SRC}/libgssapi_krb5.so.2 ${SRC}/libkrb5.so.3 \
${SRC}/libk5crypto.so.3 ${SRC}/libcom_err.so.2 ${SRC}/libssl.so.1.1 \
${SRC}/libcrypto.so.1.1 ${SRC}/libkrb5support.so.0 ${SRC}/libkeyutils.so.1 \
${SRC}/libbz2.so.1 ${SRC}/libcurl.so.4 ${SRC}/libbz2.so.1 \
${SRC}/libnghttp2.so.14 ${SRC}/libzstd.so.1 ${SRC}/libidn2.so.0 \
${SRC}/libssh.so.4 ${SRC}/libpsl.so.5 ${SRC}/libldap-2.4.so.2 \
${SRC}/liblber-2.4.so.2 ${SRC}/libbrotlidec.so.1 ${SRC}/libunistring.so.2 \
${SRC}/libsasl2.so.3 ${SRC}/libbrotlicommon.so.1 \
/usr/lib64
COPY --from=builder /mnt/rootfs/usr/share/Modules/modulefiles/php56 /usr/share/Modules/modulefiles/php56
COPY --from=builder /mnt/rootfs/opt/remi /opt/remi
COPY --from=builder /mnt/rootfs/var/opt/remi /var/opt/remi
COPY --from=builder /mnt/rootfs/etc/opt/remi /etc/opt/remi
COPY --from=builder /mnt/rootfs/etc/scl/prefixes/php56 /etc/scl/prefixes/php56
COPY --from=builder ${ROOTFS}/usr/share/Modules/modulefiles/php56 /usr/share/Modules/modulefiles/php56
COPY --from=builder ${ROOTFS}/opt/remi /opt/remi
COPY --from=builder ${ROOTFS}/var/opt/remi /var/opt/remi
COPY --from=builder ${ROOTFS}/etc/opt/remi /etc/opt/remi
COPY --from=builder ${ROOTFS}/etc/scl/prefixes/php56 /etc/scl/prefixes/php56
FROM scratch
ARG OS_VERSION=8.10
LABEL maintainer="Muhamad Aditya Prima <aprimediet@gmail.com>"
LABEL name="almalinux-micro"
LABEL version="${OS_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="Almalinux 9 micro container image"
LABEL description="Provide latest release of micro Almalinux 9 container base image"
LABEL io.k8s.description="Very small almalinux 9 based image which doesn't install package manager"
LABEL io.k8s.display-name="Almalinux 9 Micro"
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=56
ARG PHP_VER_SHORT=5
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on almalinux-micro based container image"
LABEL description="Provide php on almalinux-micro based container base image"
LABEL io.k8s.description="Small almalinux micro container image"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=stage2 / /
RUN ln -s /opt/remi/php${PHP_VER_SHORT}/root/usr/bin/php /usr/bin/php ; \

132
5/Dockerfile.full-almalinux Normal file
View File

@ -0,0 +1,132 @@
ARG OS_VERSION=8.10
FROM quay.io/sindigilive/almalinux:${OS_VERSION} AS builder
ARG FLAVOR=full
ARG WITH_APACHE=false
ARG WITH_DATABASE=false
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=56
ENV FLAVOR=${FLAVOR}
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
WORKDIR /tmp
ADD 5/scripts/almalinux-setup.sh ./setup.sh
ENV ROOTFS=/mnt/rootfs
RUN /bin/mkdir -p ${ROOTFS}; \
/bin/chmod +x ./setup.sh; \
/usr/bin/dnf install --installroot ${ROOTFS} \
coreutils-single \
glibc-minimal-langpack \
epel-release \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y ; \
/usr/bin/dnf install --installroot ${ROOTFS} \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y ; \
/usr/bin/dnf install --installroot ${ROOTFS} \
php${PHP_VER_SHORT}-php-cli \
php${PHP_VER_SHORT}-php-common \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y ; \
/bin/sh ./setup.sh ; \
/usr/bin/dnf --installroot ${ROOTFS} clean all ; \
/bin/rm -f ./setup.sh ;
FROM quay.io/sindigilive/almalinux:${OS_VERSION}-micro AS stage2
ARG PHP_VER_SHORT=56
ENV ROOTFS=/mnt/rootfs
ENV SRC=${ROOTFS}/usr/lib64
RUN mkdir -p /app ; \
echo "php:x:1001:" >> /etc/group ; \
echo "php:x:1001:1001:php:/app:/bin/sh" >> /etc/passwd ; \
echo "php:!!:20070::::::" >> /etc/shadow ;
COPY --from=builder \
${SRC}/libcrypt.so.1 ${SRC}/libedit.so.0 ${SRC}/libstdc++.so.6 \
${SRC}/libz.so.1 ${SRC}/libpcre.so.1 ${SRC}/libxml2.so.2 \
${SRC}/liblzma.so.5 ${SRC}/libgssapi_krb5.so.2 ${SRC}/libkrb5.so.3 \
${SRC}/libk5crypto.so.3 ${SRC}/libcom_err.so.2 ${SRC}/libssl.so.1.1 \
${SRC}/libcrypto.so.1.1 ${SRC}/libkrb5support.so.0 ${SRC}/libkeyutils.so.1 \
${SRC}/libbz2.so.1 ${SRC}/libcurl.so.4 ${SRC}/libbz2.so.1 \
${SRC}/libnghttp2.so.14 ${SRC}/libzstd.so.1 ${SRC}/libidn2.so.0 \
${SRC}/libssh.so.4 ${SRC}/libpsl.so.5 ${SRC}/libldap-2.4.so.2 \
${SRC}/liblber-2.4.so.2 ${SRC}/libbrotlidec.so.1 ${SRC}/libunistring.so.2 \
${SRC}/libsasl2.so.3 ${SRC}/libbrotlicommon.so.1 ${SRC}/libdb-5.3.so \
${SRC}/libenchant.so.1 ${SRC}/libgd.so.103 ${SRC}/libgmp.so.10 \
${SRC}/libc-client.so.2007 ${SRC}/libfbclient.so.2 ${SRC}/libicui18n.so.69 \
${SRC}/libldap_r-2.4.so.2 ${SRC}/libmcrypt.so.4 ${SRC}/libsqlite3.so.0 \
${SRC}/libtidy.so.5 ${SRC}/libexslt.so.0 ${SRC}/libbrotlienc.so.1 \
${SRC}/libgeos_c.so.1 ${SRC}/libMagickWand-6.Q16.so.7 ${SRC}/libpurple.so.0 \
${SRC}/libtokyocabinet.so.9 ${SRC}/libgmodule-2.0.so.0 ${SRC}/libt1.so.5 \
${SRC}/libpam.so.0 ${SRC}/libtommath.so.1 ${SRC}/libicuuc.so.69 \
${SRC}/libltdl.so.7 ${SRC}/libxslt.so.1 ${SRC}/libgeos-3.7.2.so \
${SRC}/libMagickCore-6.Q16.so.7 ${SRC}/libdbus-glib-1.so.2 ${SRC}/libglib-2.0.so.0 \
${SRC}/libX11.so.6 ${SRC}/libaudit.so.1 ${SRC}/libtomcrypt.so.1 \
${SRC}/libicudata.so.69 ${SRC}/libgcrypt.so.20 ${SRC}/libtomcrypt.so.1 \
${SRC}/liblcms2.so.2 ${SRC}/libdbus-1.so.3 ${SRC}/libgnutls.so.30 \
${SRC}/libXpm.so.4 ${SRC}/libcap-ng.so.0 ${SRC}/libicuio.so.69 \
${SRC}/libgpg-error.so.0 ${SRC}/libraqm.so.0 ${SRC}/libgthread-2.0.so.0 \
${SRC}/libp11-kit.so.0 ${SRC}/libpng16.so.16 ${SRC}/libfontconfig.so.1 \
${SRC}/libfarstream-0.2.so.5 ${SRC}/libtasn1.so.6 ${SRC}/libjpeg.so.62 \
${SRC}/libfreetype.so.6 ${SRC}/libgstvideo-1.0.so.0 ${SRC}/libnettle.so.6 \
${SRC}/libimagequant.so.0 ${SRC}/libXext.so.6 ${SRC}/libgstapp-1.0.so.0 \
${SRC}/libhogweed.so.4 ${SRC}/libtiff.so.5 ${SRC}/libXt.so.6 \
${SRC}/libgstbase-1.0.so.0 ${SRC}/libffi.so.6 ${SRC}/libwebp.so.7 \
${SRC}/libSM.so.6 ${SRC}/libgstreamer-1.0.so.0 ${SRC}/libavif.so.14 \
${SRC}/libICE.so.6 ${SRC}/libgobject-2.0.so.0 ${SRC}/libgomp.so.1 \
${SRC}/libidn.so.11 ${SRC}/libxcb.so.1 ${SRC}/libharfbuzz.so.0 \
${SRC}/libgio-2.0.so.0 ${SRC}/libfribidi.so.0 ${SRC}/libsystemd.so.0 \
${SRC}/libexpat.so.1 ${SRC}/liborc-0.4.so.0 ${SRC}/libuuid.so.1 \
${SRC}/libmount.so.1 ${SRC}/libjbig.so.2.1 ${SRC}/libgraphite2.so.3 \
${SRC}/liblz4.so.1 ${SRC}/libdav1d.so.3 ${SRC}/libXau.so.6 \
${SRC}/libblkid.so.1 ${SRC}/libSvtAv1Enc.so.0 ${SRC}/libaom.so.3 \
/usr/lib64
COPY --from=builder ${ROOTFS}/usr/share/Modules/modulefiles/php56 /usr/share/Modules/modulefiles/php56
COPY --from=builder ${ROOTFS}/opt/remi /opt/remi
COPY --from=builder ${ROOTFS}/var/opt/remi /var/opt/remi
COPY --from=builder ${ROOTFS}/etc/opt/remi /etc/opt/remi
COPY --from=builder ${ROOTFS}/etc/scl/prefixes/php56 /etc/scl/prefixes/php56
FROM scratch
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=56
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on almalinux-micro based container image"
LABEL description="Provide php on almalinux-micro based container base image"
LABEL io.k8s.description="Small almalinux micro container image"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=stage2 / /
RUN ln -s /opt/remi/php${PHP_VER_SHORT}/root/usr/bin/php /usr/bin/php ; \
ln -s /opt/remi/php${PHP_VER_SHORT}/root/usr/bin/php-cgi /usr/bin/php-cgi ; \
ln -s /opt/remi/php${PHP_VER_SHORT}/root/usr/bin/php-phar /usr/bin/php-phar ; \
ln -s /opt/remi/php${PHP_VER_SHORT}/root/usr/bin/phpize /usr/bin/phpize ;
USER php
WORKDIR /app
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

View File

@ -0,0 +1,32 @@
#!/bin/sh
PHP_LIST="bcmath,brotli,dba,embedded,enchant,
gd,geos,gmp,imap,interbase,
intl,ioncube-loader,ldap,lz4,magickwand,
mbstring,mcrypt,opcache,pear,phurple,
soap,tidy,twig,xcache,xml,
xmlrpc,zstd";
PHP_DEPS="";
# apache2 configurations
SERVER_ROOT="/app";
APP_ROOT="$SERVER_ROOT/htdocs";
LOG_LEVEL="info";
# Setup php flavor
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-php-$i ";
done
/usr/bin/dnf install --installroot $ROOTFS \
$PHP_DEPS \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y;
fi
if [[ "$FLAVOR" == "debug" ]]; then
LOG_LEVEL="debug";
/usr/bin/dnf install --installroot $ROOTFS \
php$PHP_VER_SHORT-php-dbg \
--releasever 8 --setopt install_weak_deps=false --nodocs --nogpgcheck -y;
fi

View File

@ -6,7 +6,7 @@ dom,embed,enchant,exif,ftp,
gd,gettext,gmp,iconv,imap,
intl,json,ldap,mcrypt,
opcache,openssl,pcntl,pdo,
pear,phar,phpdbg,
pear,phpdbg,
posix,pspell,shmop,
snmp,soap,sockets,sysvmsg,sysvsem,
sysvshm,wddx,xml,xmlreader,
@ -19,42 +19,33 @@ LOG_LEVEL="info"
# Setup php flavor
if [[ "$FLAVOR" == "debug" ]]; then
LOG_LEVEL="debug"
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-dbg;
fi
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
/sbin/apk add --update --no-cache $PHP_DEPS;
fi
# Only setup apache with full flavor parameters
if [ "$WITH_APACHE" == "true" ]; then
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
/usr/sbin/addgroup -g 10001 apache ;
/usr/sbin/adduser -D -u 10001 -G apache -s /bin/sh -h $APP_ROOT apache ;
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
/usr/sbin/addgroup -g 10001 apache ;
/usr/sbin/adduser -D -u 10001 -G apache -s /sbin/nologin -h $APP_ROOT apache ;
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
fi
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
fi
if [ "$WITH_DATABASE" == "postgresql" ]; then
@ -62,5 +53,6 @@ if [ "$WITH_DATABASE" == "postgresql" ]; then
fi
if [ "$WITH_DATABASE" == "mysql" ]; then
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_mysql php$PHP_VER_SHORT-mysql php$PHP_VER_SHORT-mysqli ;
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_mysql php$PHP_VER_SHORT-mysql \
php$PHP_VER_SHORT-mysqli ;
fi

68
7/Dockerfile.almalinux Normal file
View File

@ -0,0 +1,68 @@
ARG OS_VERSION=8.10
FROM quay.io/teras/almalinux:${OS_VERSION}-minimal AS builder
ARG PHP_VERSION=7.4
ARG COMPOSER_VERSION=2.8.9
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
RUN /bin/microdnf -y --nodocs install shadow-utils; \
/bin/mkdir -p ${SERVER_ROOT}; \
/sbin/groupadd -g 10000 php; \
/sbin/useradd -u 10000 -g 10000 -s /bin/sh -M -d ${SERVER_ROOT} php; \
/bin/chown -R php:php ${SERVER_ROOT}; \
/bin/microdnf -y --nodocs install epel-release; \
/bin/microdnf -y upgrade; \
/bin/rpm -Uvh --replacepkgs --replacefiles \
https://rpms.remirepo.net/enterprise/remi-release-8.rpm; \
/bin/microdnf -y module reset php; \
/bin/microdnf -y module enable php:remi-${PHP_VERSION}; \
/bin/microdnf -y --nodocs install \
php php-cli php-common php-phar \
php-iconv php-mbstring php-json;
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
RUN /bin/chmod +rx /usr/local/bin/composer; \
/bin/microdnf -y remove shadow-utils; \
/bin/microdnf clean all; \
/bin/rm -rf /var/cache/yum/*; \
/bin/rm -rf /var/lib/yum/history/*; \
/bin/rm -rf /var/lib/yum/yumdb/*; \
/bin/rm -rf /var/lib/dnf/*;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VERSION} /usr/bin/php; exit 0
FROM scratch
ARG PHP_VERSION=7.4
ARG COMPOSER_VERSION=2.8.9
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
LABEL maintainer="Muhamad Aditya Prima <aditya@teraslink.id>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on almalinux-minimal container image"
LABEL description="Provide php on almalinux-minimal container base image"
LABEL io.k8s.description="PHP with composer"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=builder / /
WORKDIR ${SERVER_ROOT}
USER php
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

View File

@ -2,45 +2,25 @@
# PHP 7.3 == 3.12
# PHP 7.4 == 3.15
ARG OS_VERSION=3.15
ARG PHP_VERSION=7.4
FROM quay.io/sindigilive/alpine:${OS_VERSION} AS builder
LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
FROM quay.io/sindigilive/php:${PHP_VERSION}-builder-alpine AS builder
ARG FLAVOR=cli
ARG WITH_APACHE=false
ARG WITH_DATABASE=false
ARG PHP_VERSION=7.4
ARG PHP_VER_SHORT=7
ENV FLAVOR=${FLAVOR}
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
WORKDIR /root
ADD 7/scripts/alpine-setup.sh /tmp/setup.sh
# Create directory, and install required php app
RUN /bin/mkdir -p /app ; \
/sbin/apk add --update --no-cache \
php${PHP_VER_SHORT} php${PHP_VER_SHORT}-common \
php${PHP_VER_SHORT}-cli ; \
/bin/chmod +x /tmp/setup.sh; \
/bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VER_SHORT} /usr/bin/php ; exit 0
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*
RUN /bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh; \
rm -vrf /var/cache/apk/*
FROM scratch
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=5
ARG PHP_VERSION=7.4
ARG PHP_VER_SHORT=7
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
@ -60,6 +40,8 @@ COPY --from=builder / /
WORKDIR /app
USER php
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

View File

@ -2,46 +2,29 @@
# PHP 7.3 == 3.12
# PHP 7.4 == 3.15
ARG OS_VERSION=3.15
FROM quay.io/sindigilive/alpine:${OS_VERSION} AS builder
LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
ARG FLAVOR=cli
ARG WITH_APACHE=false
ARG WITH_DATABASE=false
ARG PHP_VERSION=7.4
ARG PHP_VER_SHORT=7
ENV FLAVOR=${FLAVOR}
FROM quay.io/sindigilive/php:${PHP_VERSION}-builder-alpine AS builder
USER root
ARG WITH_APACHE=true
ARG WITH_DATABASE=false
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
ENV SERVER_ROOT=/app
ENV APP_ROOT=${SERVER_ROOT}/htdocs
WORKDIR /root
ADD 7/scripts/alpine-setup.sh /tmp/setup.sh
ADD scripts/entrypoint.sh /usr/local/bin/
ADD scripts/apache-entrypoint.sh /usr/local/bin/entrypoint
ADD htdocs ${APP_ROOT}
# Create directory, and install required php app
RUN /bin/mkdir -p /app ; \
/sbin/apk add --update --no-cache \
php${PHP_VER_SHORT} php${PHP_VER_SHORT}-common \
php${PHP_VER_SHORT}-cli ; \
/bin/chmod +x /tmp/setup.sh /usr/local/bin/entrypoint.sh ; \
/bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh;
ADD htdocs ${SERVER_ROOT}/htdocs
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VER_SHORT} /usr/bin/php ; exit 0
# CLEAN APK CACHES
RUN sed -i "s|#version#|${PHP_VERSION}|" /app/htdocs/index.html ; \
RUN /bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh; \
rm -vrf /var/cache/apk/*; \
chmod +rx /usr/local/bin/entrypoint ; \
sed -i "s|#version#|${PHP_VERSION}|" /app/htdocs/index.html ; \
sed -i "s|#os#|alpine|" /app/htdocs/index.html ; \
sed -i "s|#flavor#|${FLAVOR}|" /app/htdocs/index.html ; \
mkdir -p ${SERVER_ROOT}/logs ${SERVER_ROOT}/run /run/apache2 ; \
ln -s /usr/lib/apache2 ${SERVER_ROOT}/modules ; \
chmod -R 755 ${SERVER_ROOT}/logs ${SERVER_ROOT/run} ; \
@ -50,8 +33,8 @@ RUN sed -i "s|#version#|${PHP_VERSION}|" /app/htdocs/index.html ; \
FROM scratch
ARG PHP_VERSION=5.6
ARG PHP_VER_SHORT=5
ARG PHP_VERSION=7.4
ARG PHP_VER_SHORT=7
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
@ -75,4 +58,4 @@ WORKDIR /app/htdocs
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]
CMD ["/usr/local/bin/entrypoint"]

View File

@ -0,0 +1,39 @@
# PHP 7.2 == 3.9
# PHP 7.3 == 3.12
# PHP 7.4 == 3.15
ARG OS_VERSION=3.15
FROM quay.io/sindigilive/alpine:${OS_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
ARG PHP_VERSION=7.4
ARG PHP_VER_SHORT=7
ARG COMPOSER_VERSION=2.8.4
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
WORKDIR ${SERVER_ROOT}
ADD 7/scripts/alpine-setup.sh /tmp/setup.sh
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
# Create directory, and install required php app
RUN /bin/mkdir -p /app ; \
/usr/sbin/addgroup -g 10000 php ; \
/usr/sbin/adduser -D -u 10000 -G php -s /bin/sh -h $SERVER_ROOT php ; \
/bin/chown -R php:php /app ; \
/sbin/apk add --update --no-cache \
php${PHP_VER_SHORT} php${PHP_VER_SHORT}-common \
php${PHP_VER_SHORT}-cli php${PHP_VER_SHORT}-phar \
php${PHP_VER_SHORT}-iconv php${PHP_VER_SHORT}-mbstring \
php${PHP_VER_SHORT}-json ; \
/bin/chmod +rx /tmp/setup.sh /usr/local/bin/composer ;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VER_SHORT} /usr/bin/php ; exit 0
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*

View File

@ -1,11 +1,11 @@
#!/bin/sh
PHP_LIST="bcmath,brotli,bz2,calendar,cgi,
PHP_LIST="bcmath,bz2,calendar,cgi,
ctype,curl,dba,dom,embed,
enchant,exif,fileinfo,ftp,gd,
gettext,gmp,iconv,imap,intl,
json,ldap,mbstring,opcache,openssl,
pcntl,pdo,pear,phar,posix,
gettext,gmp,imap,intl,
ldap,opcache,openssl,
pcntl,pdo,pear,posix,
pspell,shmop,snmp,soap,sockets,
sysvmsg,sysvsem,sysvshm,tidy,tokenizer,
xml,xmlreader,xmlrpc,xsl,zip"
@ -15,45 +15,33 @@ SERVER_ROOT="/app"
APP_ROOT="$SERVER_ROOT/htdocs"
LOG_LEVEL="info"
# Setup php flavor
if [[ "$FLAVOR" == "debug" ]]; then
LOG_LEVEL="debug"
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-dbg \
php$PHP_VER_SHORT-phpdbg php$PHP_VER_SHORT-dev;
fi
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
/sbin/apk add --update --no-cache $PHP_DEPS;
fi
# Only setup apache with full flavor parameters
# Setup apache2
if [ "$WITH_APACHE" == "true" ]; then
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
/usr/sbin/addgroup -g 10001 apache ;
/usr/sbin/adduser -D -u 10001 -G apache -s /bin/sh -h $APP_ROOT apache ;
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
/usr/sbin/addgroup -g 10001 apache ;
/usr/sbin/adduser -D -u 10001 -G apache -s /bin/sh -h $APP_ROOT apache ;
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
fi
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
fi
if [ "$WITH_DATABASE" == "postgresql" ]; then

View File

@ -0,0 +1,3 @@
ARG PHP_VERSION=8.4
FROM quay.io/teras/php:${PHP_VERSION}

View File

@ -0,0 +1,62 @@
# PHP 8.0 == 3.16
# PHP 8.1 == 3.19
# PHP 8.2 == 3.21
# PHP 8.3 == 3.21
ARG OS_VERSION=3.21
ARG PHP_VERSION=8.3
FROM quay.io/sindigilive/php:${PHP_VERSION}-builder-alpine AS builder
USER root
ARG WITH_APACHE=true
ARG WITH_DATABASE=false
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
ENV APP_ROOT=${SERVER_ROOT}/htdocs
ADD scripts/apache-entrypoint.sh /usr/local/bin/entrypoint
ADD htdocs ${APP_ROOT}
# Create directory, and install required php app
RUN /bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh; \
rm -vrf /var/cache/apk/*; \
chmod +rx /usr/local/bin/entrypoint ; \
sed -i "s|#version#|${PHP_VERSION}|" /app/htdocs/index.html ; \
sed -i "s|#os#|alpine|" /app/htdocs/index.html ; \
mkdir -p ${SERVER_ROOT}/logs ${SERVER_ROOT}/run /run/apache2 ; \
ln -s /usr/lib/apache2 ${SERVER_ROOT}/modules ; \
chmod -R 755 ${SERVER_ROOT}/logs ${SERVER_ROOT/run} ; \
chown -R apache:apache ${SERVER_ROOT}/htdocs ${SERVER_ROOT}/logs ${SERVER_ROOT}/run /run/apache2 ; \
rm -vrf /var/cache/apk/*
FROM scratch
ARG PHP_VERSION=8.3
ARG PHP_VER_SHORT=83
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on alpine based container image"
LABEL description="Provide php on alpine based container base image"
LABEL io.k8s.description="Very small alpine linux container image"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=builder / /
USER apache
WORKDIR /app/htdocs
STOPSIGNAL SIGQUIT
CMD ["/usr/local/bin/entrypoint"]

48
8/Dockerfile.alpine-bak Normal file
View File

@ -0,0 +1,48 @@
# PHP 8.0 == 3.16
# PHP 8.1 == 3.19
# PHP 8.2 == 3.21
# PHP 8.3 == 3.21
ARG OS_VERSION=3.21
ARG PHP_VERSION=8.4
FROM quay.io/sindigilive/php:${PHP_VERSION}-builder-alpine AS builder
ARG WITH_APACHE=false
ARG WITH_DATABASE=false
ENV WITH_APACHE=${WITH_APACHE}
ENV WITH_DATABASE=${WITH_DATABASE}
# Create directory, and install required php app
RUN /bin/sh /tmp/setup.sh; \
/bin/rm -f /tmp/*.sh; \
rm -vrf /var/cache/apk/*
FROM scratch
ARG PHP_VERSION=8.4
ARG PHP_SHORT_VERSION=84
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_SHORT_VERSION=${PHP_SHORT_VERSION}
LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on alpine based container image"
LABEL description="Provide php on alpine based container base image"
LABEL io.k8s.description="Very small alpine linux container image"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=builder / /
WORKDIR /app
USER php
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

View File

@ -0,0 +1,40 @@
# PHP 8.0 == 3.16
# PHP 8.1 == 3.19
# PHP 8.2 == 3.21
# PHP 8.3 == 3.21
ARG OS_VERSION=3.21
FROM quay.io/sindigilive/alpine:${OS_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> map@sindigilive.com"
ARG PHP_VERSION=8.3
ARG PHP_VER_SHORT=83
ARG COMPOSER_VERSION=2.8.4
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_VER_SHORT=${PHP_VER_SHORT}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
WORKDIR ${SERVER_ROOT}
ADD 8/scripts/alpine-setup.sh /tmp/setup.sh
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
# Create directory, and install required php app
RUN /bin/mkdir -p /app ; \
/usr/sbin/addgroup -g 10000 php ; \
/usr/sbin/adduser -D -u 10000 -G php -s /bin/sh -h $SERVER_ROOT php ; \
/bin/chown -R php:php /app ; \
/sbin/apk add --update --no-cache \
php${PHP_VER_SHORT} php${PHP_VER_SHORT}-common \
php${PHP_VER_SHORT}-cli php${PHP_VER_SHORT}-phar \
php${PHP_VER_SHORT}-iconv php${PHP_VER_SHORT}-mbstring \
php${PHP_VER_SHORT}-json ; \
/bin/chmod +rx /tmp/setup.sh /usr/local/bin/composer ;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VER_SHORT} /usr/bin/php ; exit 0
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*

View File

@ -0,0 +1,31 @@
# DIRECTORY CONFIGURATION
SERVER_ROOT="/app"
APP_ROOT="$SERVER_ROOT/htdocs"
LOG_LEVEL="info"
/bin/mkdir -p $APP_ROOT $SERVER_ROOT/run $SERVER_ROOT/log $SERVER_ROOT/cgi-bin;
/usr/sbin/groupadd -g 10001 httpd ;
/usr/sbin/useradd -D -u 10001 -g 10001 -s /bin/sh -h $APP_ROOT httpd ;
/bin/chown -R httpd:httpd $SERVER_ROOT;
/bin/chmod -R 755 $APP_ROOT;
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/httpd/httpd.conf ;
sed -i "s|User apache|User httpd|" /etc/httpd/httpd.conf ;
sed -i "s|Group httpd|Group httpd|" /etc/httpd/httpd.conf ;
sed -i "s|ServerAdmin root@localhost| ServerAdmin httpd@localhost|" /etc/httpd/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www\"|DocumentRoot \"${SERVER_ROOT}\"|" /etc/httpd/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/html\"|DocumentRoot \"${APP_ROOT}\"|" /etc/httpd/httpd.conf ;
sed -i "s|Directory \"/var/www/html\"|Directory \"${APP_ROOT}\"|" /etc/httpd/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/httpd/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/httpd/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/httpd/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/httpd/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/httpd/httpd.conf ;
#sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/httpd/httpd.conf ;
#sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/httpd/httpd.conf ;
#sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/httpd/httpd.conf ;
sed -i "s|/var/www/cgi-bin/|${SERVER_ROOT}/cgi-bin/|" /etc/httpd/httpd.conf ;
# sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
# sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
# sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;

54
8/scripts/alpine-setup.sh Normal file
View File

@ -0,0 +1,54 @@
#!/bin/sh
PHP_LIST="bcmath,bz2,calendar,cgi,
ctype,curl,dba,dom,embed,
enchant,exif,fileinfo,ftp,gd,
gettext,gmp,imap,intl,
ldap,opcache,openssl,
pcntl,pdo,pear,posix,
pspell,shmop,snmp,soap,sockets,
sysvmsg,sysvsem,sysvshm,tidy,tokenizer,
xml,xmlreader,xmlwriter,xmlrpc,xsl,zip"
PHP_DEPS=""
# apache2 configurations
SERVER_ROOT="/app"
APP_ROOT="$SERVER_ROOT/htdocs"
LOG_LEVEL="info"
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
/sbin/apk add --update --no-cache $PHP_DEPS;
# Setup apache2
if [ "$WITH_APACHE" == "true" ]; then
/usr/sbin/addgroup -g 10001 apache ;
/usr/sbin/adduser -D -u 10001 -G apache -s /bin/sh -h $APP_ROOT apache ;
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
fi
if [ "$WITH_DATABASE" == "postgresql" ]; then
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_pgsql php$PHP_VER_SHORT-pgsql ;
fi
if [ "$WITH_DATABASE" == "mysql" ]; then
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_mysql php$PHP_VER_SHORT-mysql \
php$PHP_VER_SHORT-mysqli php$PHP_VER_SHORT-mysqlnd ;
fi

0
8/scripts/entrypoint.sh Normal file
View File

126
Dockerfile.almalinux Normal file
View File

@ -0,0 +1,126 @@
ARG OS_VERSION=9.5
FROM quay.io/teras/almalinux:${OS_VERSION}-minimal AS builder
ARG OS_SHORT_VERSION=9
ARG PHP_VERSION=8.4
ARG COMPOSER_VERSION=2.8.9
ARG WEB_SERVER=false
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
ENV APP_ROOT=${SERVER_ROOT}/htdocs
ENV WEB_SERVER=${WEB_SERVER}
ENV COMPOSER_HOME=/var/lib/composer
ENV COMPOSER_ALLOW_SUPERUSER=0
ENV COMPOSER_NO_INTERACTION=1
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
ENV COMPOSER_VENDOR_DIR=${COMPOSER_HOME}/vendor
ENV COMPOSER_BIN_DIR=${COMPOSER_HOME}/bin
USER root
WORKDIR ${SERVER_ROOT}
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}; \
/bin/chown -R appuser:appuser ${COMPOSER_HOME}; \
/bin/microdnf -y --nodocs install epel-release; \
/bin/microdnf -y upgrade; \
/bin/rpm -Uvh --replacepkgs --replacefiles \
https://rpms.remirepo.net/enterprise/remi-release-${OS_SHORT_VERSION}.rpm; \
/bin/microdnf -y module reset php; \
/bin/microdnf -y module enable php:remi-${PHP_VERSION}; \
/bin/microdnf -y --nodocs install \
php php-cli php-common php-phar \
php-iconv php-mbstring php-json; \
/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/rm -rf /var/cache/yum/*; \
/bin/rm -rf /var/lib/yum/history/*; \
/bin/rm -rf /var/lib/yum/yumdb/*; \
/bin/rm -rf /var/lib/dnf/*;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_VERSION} /usr/bin/php; exit 0
FROM scratch
ARG PHP_VERSION=8.4
ARG COMPOSER_VERSION=2.8.9
# Environment variables for user root
ENV LANG=en_US.UTF-8
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
ENV APP_ROOT=${SERVER_ROOT}/htdocs
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
ENV COMPOSER_ALLOW_SUPERUSER=0
ENV COMPOSER_NO_INTERACTION=1
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
ENV COMPOSER_VENDOR_DIR=${COMPOSER_HOME}/vendor
ENV COMPOSER_BIN_DIR=${COMPOSER_HOME}/bin
LABEL maintainer="Muhamad Aditya Prima <aditya@teraslink.id>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on almalinux-minimal container image"
LABEL description="Provide php on almalinux-minimal container base image"
LABEL io.k8s.description="PHP with composer"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=builder / /
ENV PATH="${PATH}:${COMPOSER_BIN_DIR}:${COMPOSER_VENDOR_DIR}/bin"
WORKDIR ${SERVER_ROOT}
USER appuser
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

94
Dockerfile.alpine Normal file
View File

@ -0,0 +1,94 @@
# 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.1 == 3.19
# PHP 8.2 == 3.21
# PHP 8.3 == 3.21
# PHP 8.4 == 3.21
ARG OS_VERSION=3.21
FROM quay.io/teras/alpine:${OS_VERSION} AS builder
ARG PHP_VERSION=8.4
ARG PHP_SHORT_VERSION=84
ARG COMPOSER_VERSION=2.8.9
ENV PHP_VERSION=${PHP_VERSION}
ENV PHP_SHORT_VERSION=${PHP_SHORT_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
ENV COMPOSER_HOME=/var/lib/composer
ENV COMPOSER_ALLOW_SUPERUSER=0
ENV COMPOSER_NO_INTERACTION=1
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
ENV COMPOSER_VENDOR_DIR=${COMPOSER_HOME}/vendor
ENV COMPOSER_BIN_DIR=${COMPOSER_HOME}/bin
USER root
WORKDIR ${SERVER_ROOT}
ADD https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar /usr/local/bin/composer
# Create directory, and install required php app
RUN /bin/mkdir -p ${COMPOSER_CACHE_DIR} ${COMPOSER_VENDOR_DIR} ${COMPOSER_BIN_DIR}; \
/bin/chown -R appuser:appuser ${COMPOSER_HOME}; \
/sbin/apk add --update --no-cache \
php${PHP_SHORT_VERSION} php${PHP_SHORT_VERSION}-common \
php${PHP_SHORT_VERSION}-cli php${PHP_SHORT_VERSION}-phar \
php${PHP_SHORT_VERSION}-iconv php${PHP_SHORT_VERSION}-mbstring \
php${PHP_SHORT_VERSION}-json php${PHP_SHORT_VERSION}-openssl ; \
/bin/chmod +rx /usr/local/bin/composer ;
# Create symlinks to /usr/bin/php in case it doesn't exists
RUN ln -ns /usr/bin/php${PHP_SHORT_VERSION} /usr/bin/php ; exit 0
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*
FROM scratch
ARG PHP_VERSION=8.4
ARG COMPOSER_VERSION=2.8.9
# Environment variables for user root
ENV PHP_VERSION=${PHP_VERSION}
ENV COMPOSER_VERSION=${COMPOSER_VERSION}
ENV SERVER_ROOT=/app
ENV COMPOSER_HOME=${SERVER_ROOT}/.composer
ENV COMPOSER_ALLOW_SUPERUSER=0
ENV COMPOSER_NO_INTERACTION=1
ENV COMPOSER_CACHE_DIR=${COMPOSER_HOME}/cache
ENV COMPOSER_VENDOR_DIR=${COMPOSER_HOME}/vendor
ENV COMPOSER_BIN_DIR=${COMPOSER_HOME}/bin
ENV LANG=en_US.UTF-8
LABEL maintainer="Muhamad Aditya Prima <aditya@teraslink.id>"
LABEL name="php"
LABEL version="${PHP_VERSION}"
LABEL distribution-scope="public"
#labels for container catalog
LABEL summary="PHP ${PHP_VERSION} on alpine linux container image"
LABEL description="Provide php on alpine linux container base image"
LABEL io.k8s.description="PHP with composer"
LABEL io.k8s.display-name="PHP ${PHP_VERSION}"
COPY --from=builder / /
WORKDIR ${SERVER_ROOT}
USER appuser
ENV PATH=${PATH}:${COMPOSER_BIN_DIR}:${COMPOSER_VENDOR_DIR}/bin
STOPSIGNAL SIGQUIT
CMD ["/usr/bin/php", "-v"]

View File

@ -1,61 +0,0 @@
ARG REGISTRY_URL=docker.io/aprimediet
ARG PHP=8.3
FROM ${REGISTRY_URL}/php:${PHP}-alpine
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
# DEFINE ENV
ENV SERVER_ROOT=/app
ENV SERVER_ADMIN=you@example.com
ENV APP_DIR=${SERVER_ROOT}/htdocs
ENV LOG_LEVEL=info
ENV PHP_MEMORY_LIMIT=256M
# SET WORKDIR
WORKDIR /tmp
# SETUP APACHE2 USER
RUN addgroup -g 10001 apache && \
adduser -D -u 10001 -G apache -s /bin/sh -h ${APP_DIR} apache
# INSTALL APACHE2
RUN --mount=type=cache,target=/var/cache/apk \
apk upgrade && apk add --update \
apache2 php${PHP_VERSION}-apache2
# CREATE SYMLINKS TO /app
RUN mkdir -p ${APP_DIR} && \
mkdir -p ${SERVER_ROOT}/logs && \
mkdir -p ${SERVER_ROOT}/run && \
ln -s /usr/lib/apache2 ${SERVER_ROOT}/modules && \
chmod -R 755 ${SERVER_ROOT}/logs && \
chmod -R 755 ${SERVER_ROOT/run}
# CONFIGURE HTTPD
RUN sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf && \
sed -i "s|ServerAdmin you@example.com| ServerAdmin ${SERVER_ADMIN}|" /etc/apache2/httpd.conf && \
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_DIR}\"|" /etc/apache2/httpd.conf && \
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_DIR}\"|" /etc/apache2/httpd.conf && \
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf && \
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf && \
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf && \
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf && \
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf && \
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf && \
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf && \
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf && \
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf
# ADD INITIALIZATION SCRIPT
ADD ./scripts/entrypoint /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint && \
cp -vR /var/www/localhost/htdocs/* ${APP_DIR}/ && \
rm -vrf /var/www && \
chown -R apache:apache ${APP_DIR}
WORKDIR ${APP_DIR}
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/entrypoint"]

View File

@ -12,15 +12,15 @@
</head>
<body>
<h1>Welcome to httpd!</h1>
<h2>The sindigilive/php:#version#-apache-#flavor#-#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
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<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/>
please refer to <a href="https://github.com/aprimediet/docker-php">sindigilive/php</a>.</p>
<p>For online documentation specific to the teras/php:#version#-apache variant,<br/>
please refer to <a href="https://github.com/aprimediet/docker-php">teras/php</a>.</p>
<p><em>Thank you for using httpd.</em></p>
</body>