invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
398 stars 264 forks source link

use php 7.4 in invoiceninja v4 image #544

Closed 2color closed 11 months ago

2color commented 11 months ago

When attempting to run the 4.50.51 docker tag, I got an error as soon as the docker container starts:

dockerfiles-app-1     | Your Composer dependencies require a PHP version ">= 7.4.0". You are

This seems to happen as soon as php artisan runs in the container init script:

https://github.com/invoiceninja/dockerfiles/blob/master/alpine/4/rootfs/usr/local/bin/laravel-init.sh#L3

2color commented 11 months ago

After building this image locally, I get the following error as soon as the container runs:

Could this be related to the fact that its running php 7.4?

dockerfiles-app-1  | [2023-10-03 14:33:30] production.ERROR: ***ErrorException*** [0] : /var/www/app/database/migrations/2015_02_17_131714_support_token_billing.php [Line 15] => Use of undefined constant TOKEN_BILLING_ALWAYS - assumed 'TOKEN_BILLING_ALWAYS' (this will throw an Error in a future version of PHP)
dockerfiles-app-1  |  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"","locale":"en","ip":"127.0.0.1","count":1,"is_console":"yes","is_api":"no","db_server":"mysql","url":"/"}
dockerfiles-app-1  |
dockerfiles-app-1  | [2023-10-03 14:33:30] production.ERROR: [stacktrace] 2023-10-03 02:33:30 Use of undefined constant TOKEN_BILLING_ALWAYS - assumed 'TOKEN_BILLING_ALWAYS' (this will throw an Error in a future version of PHP): #0 /var/www/app/database/migrations/2015_02_17_131714_support_token_billing.php(15): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
dockerfiles-app-1  | #1 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(83): SupportTokenBilling->{closure}()
dockerfiles-app-1  | #2 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(310): Illuminate\Database\Schema\Blueprint->__construct()
dockerfiles-app-1  | #3 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(151): Illuminate\Database\Schema\Builder->createBlueprint()
dockerfiles-app-1  | #4 /var/www/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\Schema\Builder->table()
dockerfiles-app-1  | #5 /var/www/app/database/migrations/2015_02_17_131714_support_token_billing.php(16): Illuminate\Support\Facades\Facade::__callStatic()
dockerfiles-app-1  | #6 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(392): SupportTokenBilling->up()
dockerfiles-app-1  | #7 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(401): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
dockerfiles-app-1  | #8 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(200): Illuminate\Database\Migrations\Migrator->runMigration()
dockerfiles-app-1  | #9 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(165): Illuminate\Database\Migrations\Migrator->runUp()
dockerfiles-app-1  | #10 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(110): Illuminate\Database\Migrations\Migrator->runPending()
dockerfiles-app-1  | #11 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(71): Illuminate\Database\Migrations\Migrator->run()
dockerfiles-app-1  | #12 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
dockerfiles-app-1  | #13 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
dockerfiles-app-1  | #14 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
dockerfiles-app-1  | #15 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
dockerfiles-app-1  | #16 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(590): Illuminate\Container\BoundMethod::call()
dockerfiles-app-1  | #17 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call()
dockerfiles-app-1  | #18 /var/www/app/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute()
dockerfiles-app-1  | #19 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
dockerfiles-app-1  | #20 /var/www/app/vendor/symfony/console/Application.php(1009): Illuminate\Console\Command->run()
dockerfiles-app-1  | #21 /var/www/app/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
dockerfiles-app-1  | #22 /var/www/app/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
dockerfiles-app-1  | #23 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run()
dockerfiles-app-1  | #24 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Console\Application->run()
dockerfiles-app-1  | #25 /var/www/app/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
dockerfiles-app-1  | #26 {main}
dockerfiles-app-1  |
dockerfiles-app-1  |
dockerfiles-app-1  |  {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"","locale":"en","ip":"127.0.0.1","count":2,"is_console":"yes","is_api":"no","db_server":"mysql","url":"/"}
dockerfiles-app-1  |
dockerfiles-app-1  |
dockerfiles-app-1  | In 2015_02_17_131714_support_token_billing.php line 15:
dockerfiles-app-1  |
dockerfiles-app-1  |   Use of undefined constant TOKEN_BILLING_ALWAYS - assumed 'TOKEN_BILLING_ALW
dockerfiles-app-1  |   AYS' (this will throw an Error in a future version of PHP)
dockerfiles-app-1  |
dockerfiles-app-1  |
turbo124 commented 11 months ago

see here #438