[PR #1421] [MERGED] style(docker): use heredoc syntax for installphase in Dockerfile #1501

Closed
opened 2026-02-25 21:38:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/1421
Author: @Lillecarl
Created: 1/6/2025
Status: Merged
Merged: 1/13/2025
Merged by: @IrAlfred

Base: masterHead: dockerheredoc


📝 Commits (1)

  • 718327e Use heredoc syntax for installphase in Dockerfile

📊 Changes

1 file changed (+40 additions, -19 deletions)

View changed files

📝 docker/Dockerfile (+40 -19)

📄 Description

Uses heredoc syntax in the Dockerfile.

Works with Buildah and Docker at least.

However I can't build the image at all because ext-soap is missing (I tried adding it but I've never used composer so I'm yet to succeed)

STEP 15/27: RUN composer install
Composer plugins have been disabled for safety in this non-interactive session.
Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires PHP extension ext-soap * but it is missing from your system. Install or enable PHP's soap extension.
  Problem 2
    - garethp/php-ews is locked to version dev-master and an update of this package was not requested.
    - garethp/php-ews dev-master requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.

To enable extensions, verify that they are enabled in your .ini files:
    - /usr/local/etc/php/php.ini
    - /usr/local/etc/php/conf.d/cypht.ini
    - /usr/local/etc/php/conf.d/docker-fpm.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-gnupg.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
    - /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
    - /usr/local/etc/php/conf.d/xx-php-ext-memcached.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-soap` to temporarily ignore these required extensions.
Error: building at STEP "RUN composer install": while running runtime: exit status 2

Heredoc syntax along with set -e makes for much more readable Dockerfiles 😄

TODO: Add docs for how to build docker image? (I had to run builah from repo root like buildah build -f ./docker/Dockerfile


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/1421 **Author:** [@Lillecarl](https://github.com/Lillecarl) **Created:** 1/6/2025 **Status:** ✅ Merged **Merged:** 1/13/2025 **Merged by:** [@IrAlfred](https://github.com/IrAlfred) **Base:** `master` ← **Head:** `dockerheredoc` --- ### 📝 Commits (1) - [`718327e`](https://github.com/cypht-org/cypht/commit/718327e21d4946245a7725dc1565d70d5f8fb970) Use heredoc syntax for installphase in Dockerfile ### 📊 Changes **1 file changed** (+40 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `docker/Dockerfile` (+40 -19) </details> ### 📄 Description Uses [heredoc syntax](https://docs.docker.com/reference/dockerfile/#here-documents) in the Dockerfile. Works with Buildah and Docker at least. However I can't build the image at all because ext-soap is missing (I tried adding it but I've never used composer so I'm yet to succeed) ``` STEP 15/27: RUN composer install Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user. Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug Do not run Composer as root/super user! See https://getcomposer.org/root for details Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-soap * but it is missing from your system. Install or enable PHP's soap extension. Problem 2 - garethp/php-ews is locked to version dev-master and an update of this package was not requested. - garethp/php-ews dev-master requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension. To enable extensions, verify that they are enabled in your .ini files: - /usr/local/etc/php/php.ini - /usr/local/etc/php/conf.d/cypht.ini - /usr/local/etc/php/conf.d/docker-fpm.ini - /usr/local/etc/php/conf.d/docker-php-ext-gd.ini - /usr/local/etc/php/conf.d/docker-php-ext-gnupg.ini - /usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini - /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini - /usr/local/etc/php/conf.d/docker-php-ext-redis.ini - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini - /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - /usr/local/etc/php/conf.d/docker-php-ext-zip.ini - /usr/local/etc/php/conf.d/xx-php-ext-memcached.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-soap` to temporarily ignore these required extensions. Error: building at STEP "RUN composer install": while running runtime: exit status 2 ``` Heredoc syntax along with ```set -e``` makes for much more readable Dockerfiles 😄 TODO: Add docs for how to build docker image? (I had to run builah from repo root like ```buildah build -f ./docker/Dockerfile``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:38:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#1501
No description provided.