docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
symfony-demo-database-1 postgres:15-alpine "docker-entrypoint.s…" database 4 minutes ago Up 4 minutes 0.0.0.0:64396->5432/tc
p symfony-demo-mailer-1 schickling/mailcatcher "sh -c 'mailcatcher …" mailer 4 minutes ago Up 4 minutes 0.0.0.0:64397->1025/tc
p, 0.0.0.0:64398->1080/tcp symfony-demo-php-1 app-php "docker-entrypoint f…" php 4 minutes ago Restarting (2)57 seconds ago
PHPが再起動を続けているので、logsで確認してみる。
1
make logs
すると下記のエラーが出ている。
1
2
3
4
5
6
7
8
9
10
Verifying lock file contents can be installed on current platform.
php-1 | Your lock file does not contain a compatible set of packages. Please run composer update.
php-1 |
php-1 | Problem 1php-1 | - lcobucci/clock is locked to version 3.1.0 and an update of this package was not requested.
php-1 | - lcobucci/clock 3.1.0 requires php ~8.2.0 -> your php version (8.3.6) does not satisfy that requirement.
php-1 | Problem 2php-1 | - lcobucci/clock 3.1.0 requires php ~8.2.0 -> your php version (8.3.6) does not satisfy that requirement.
php-1 | - web-auth/metadata-service 4.7.7 requires lcobucci/clock ^2.2|^3.0 -> satisfiable by lcobucci/clock[3.1.0].
php-1 | - web-auth/metadata-service is locked to version 4.7.7 and an update of this package was not requested.
PHP8.3だと新しすぎるようなので、DockerfileをいじってPHP8.2にする。
Dockerfileの修正
1
2
3
4
# Versions
-FROM dunglas/frankenphp:latest-alpine AS frankenphp_upstream
+FROM dunglas/frankenphp:latest-php8.2.18-alpine AS frankenphp_upstream
FROM composer/composer:2-bin AS composer_upstream
~/workspace/symfony-demo$docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
symfony-demo-database-1 postgres:15-alpine "docker-entrypoint.s…" database 26 seconds ago Up 25 seconds 0.0.0.0:64876->5432/tcp
symfony-demo-mailer-1 schickling/mailcatcher "sh -c 'mailcatcher …" mailer 26 seconds ago Up 25 seconds 0.0.0.0:64874->1025/tcp, 0.0.0.0:64875->1080/tcp
symfony-demo-php-1 app-php "docker-entrypoint f…" php 26 seconds ago Up 25 seconds (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:443->443/udp, 2019/tcp
make init実行
1
make init
1
2
3
4
~/workspace/symfony-demo$make init
Database "app"for connection named default already exists. Skipped.
[OK] Already at the latest version ("DoctrineMigrations\Version20230619191051")