since compose v2, the container naming rule has changed.
RikkaBlue opened this issue · 0 comments
RikkaBlue commented
refer to docker/compose#8655 , the rule has changed <project-name>_<service-name>_<replica-number>
to <project-name>-<service-name>-<replica-number>
I tried to change this line
to
containerName="${NEXTCLOUD_PROJECT_NAME}-"
it seems works fine.
⠿ Container nextcloud-nextapp-1 Running 0.0s
⠿ Container nextcloud-cron-1 Created 0.1s
Attaching to nextcloud-cron-1
nextcloud-cron-1 | Will search for Nexcloud container as a Docker Compose service
nextcloud-cron-1 | Project: nextcloud, Service: nextapp
nextcloud-cron-1 | Found Nextcloud container with ID 396cdc5c652e
nextcloud-cron-1 | Chosen shell "sh" was found in the Nextcloud container
nextcloud-cron-1 | Starting crond
nextcloud-cron-1 | -------------------------------------------------------------
nextcloud-cron-1 | Executing Cron Tasks: Thu Dec 16 17:00:00 HKT 2021
nextcloud-cron-1 | -------------------------------------------------------------
nextcloud-cron-1 | > Nextcloud Container ID: 396cdc5c652e
nextcloud-cron-1 | > Running Script: ./run-cron-php.sh
nextcloud-cron-1 | > Done