eporsche / daybreak

Simple timesheets and vacation management for small businesses.
MIT License
129 stars 38 forks source link

Update sail dependency #40

Closed noraj closed 2 years ago

noraj commented 2 years ago

The image fails at building because PHP binaries are not found:

image image

docker-compose.yml is using dockerfiles from ./vendor/laravel/sail/runtimes/8.0, reading composer.lock you were using laravel/sail 1.12.12 but the issue is laravel/sail 1.12.12 is using Ubuntu 21.04 (see https://github.com/laravel/sail/blob/v1.12.12/runtimes/8.0/Dockerfile) and Ubuntu 21.04 is deprecated See http://old-releases.ubuntu.com/releases/. However since laravel/sail v1.13.4 they use Ubuntu 21.10 for the 8.0 php flavor and ubuntu 22.04 for the 8.1 php flavor.

So I removed composer.lock and modified composer.json

-"laravel/sail": "^1.0.1",
+"laravel/sail": "^1.15.0",

Now it builds.

noraj commented 2 years ago

However I had the issue when generating the app key.

image

Update note: this is because I removed composer.lock so when I relaunched composer install with my PHP which is in 8.1 it required this version.

So I modified the docker-compose.yml too.

-            context: ./vendor/laravel/sail/runtimes/8.0
+           context: ./vendor/laravel/sail/runtimes/8.1
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
-        image: sail-8.0/app
+       image: sail-8.1/app

Another solution would be to only update composer.json then run composer update "laravel/sail" to update the composer.lock only for sail. But since moving to PHP 8.1 works, it's the occasion to move forward.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.