Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build Docker image #19

Open
Yvan-Masson opened this issue Dec 26, 2024 · 0 comments
Open

Can not build Docker image #19

Yvan-Masson opened this issue Dec 26, 2024 · 0 comments

Comments

@Yvan-Masson
Copy link

Yvan-Masson commented Dec 26, 2024

Hi,

When trying to build the Docker image without MSSQL support, it fails with following error:

[+] Building 38.4s (10/14)                                                                                                                                                                    docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                    0.0s
 => => transferring dockerfile: 1.33kB                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/php:7.2-cli                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                         0.0s
 => CACHED [ 1/11] FROM docker.io/library/php:7.2-cli                                                                                                                                                   0.0s
 => [ 2/11] RUN apt-get update && apt-get install -y git                                                                                                                                               14.3s
 => [ 3/11] RUN docker-php-ext-install -j$(nproc) pdo pdo_mysql     && docker-php-ext-enable pdo pdo_mysql                                                                                              6.9s 
 => [ 4/11] RUN apt-get install -y libpq-dev     && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql     && docker-php-ext-install pdo pdo_pgsql pgsql     && docker-php-ext-enable pdo pd  15.8s 
 => [ 5/11] RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"                                                                                                               0.7s 
 => [ 6/11] RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verifi  0.3s 
 => ERROR [ 7/11] RUN php composer-setup.php --install-dir=bin --filename=composer                                                                                                                      0.3s 
------                                                                                                                                                                                                       
 > [ 7/11] RUN php composer-setup.php --install-dir=bin --filename=composer:                                                                                                                                 
0.270 Could not open input file: composer-setup.php                                                                                                                                                          
------
Dockerfile:27
--------------------
  25 |     RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  26 |     RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  27 | >>> RUN php composer-setup.php --install-dir=bin --filename=composer
  28 |     RUN php -r "unlink('composer-setup.php');"
  29 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c php composer-setup.php --install-dir=bin --filename=composer" did not complete successfully: exit code: 1

This step works f I update the PHP composer SHA384 hash, but then it fails because PHP is too old:

=> ERROR [11/11] RUN composer require webnet-fr/database-anonymizer:master-dev symfony/console symfony/config symfony/yaml                                                                             1.9s 
------                                                                                                                                                                                                       
 > [11/11] RUN composer require webnet-fr/database-anonymizer:master-dev symfony/console symfony/config symfony/yaml:                                                                                        
0.685 Cannot use symfony/console's latest version v7.2.1 as it requires php >=8.2 which is not satisfied by your platform.                                                                                   
0.781 Cannot use symfony/config's latest version v7.2.0 as it requires php >=8.2 which is not satisfied by your platform.                                                                                    
0.900 Cannot use symfony/yaml's latest version v7.2.0 as it requires php >=8.2 which is not satisfied by your platform.                                                                                      
0.904 ./composer.json has been created                                                                                                                                                                       
0.923 Running composer update webnet-fr/database-anonymizer symfony/console symfony/config symfony/yaml
0.926 Loading composer repositories with package information
1.805 Updating dependencies
1.827 Your requirements could not be resolved to an installable set of packages.
1.827 
1.827   Problem 1
1.827     - Root composer.json requires webnet-fr/database-anonymizer master-dev -> satisfiable by webnet-fr/database-anonymizer[dev-master].
1.827     - webnet-fr/database-anonymizer dev-master requires php >=8.1 -> your php version (7.2.34) does not satisfy that requirement.
1.827 
1.830 You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/console:*" to figure out if any version is installable, or "composer require symfony/console:^2.1" if you know which you need.
1.830 
1.830 Installation failed, deleting ./composer.json.
------
Dockerfile:32
--------------------
  30 |     RUN mkdir /var/www/anonymizer
  31 |     WORKDIR /var/www/anonymizer
  32 | >>> RUN composer require webnet-fr/database-anonymizer:master-dev symfony/console symfony/config symfony/yaml
  33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c composer require webnet-fr/database-anonymizer:master-dev symfony/console symfony/config symfony/yaml" did not complete successfully: exit code: 2

Updating the base image from php:7.2-cli to php:8.2-cli allow building.

Regards,
Yvan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant