GItlab ci: Composer cache permission denied
Hi,
We have an issue with using the image using Gitlab-ci. We're migrating from the edbizarro/gitlab-ci-pipeline-php image.
Expected Behavior
Composer install should install all the packages. It works if we add the --no-cache flag to composer install.
Current Behavior
Composer fails installing, gives the following error while downloading the packages:
Failed to download nunomaduro/collision from dist: /cache/files/nunomaduro/collision does not exist and could not be created:
Now trying to download from source
- Syncing nunomaduro/collision (v8.1.1) into cache
In Cache.php line 201:
copy(/cache/files/symfony/polyfill-intl-grapheme/f2ff520717c3b4b0b6f235bd92
376b0e57d129tyc.zip): Failed to open stream: Permission denied
Your Environment
These are the settings in our gitlab-ci file.
build:composer:
image: thecodingmachine/php:8.2-v4-cli
stage: build
only:
- master
- main
- development
- dev
script:
- composer install
Thanks!
I do not understand why composer in your environment store his cache to /cache/ instead of /home/docker/.cache/composer . I do not reproduice it with a regular docker run process. I recommand you to check your environments variables and gitlab-ci runner configuration.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please update it if any action still required.
This issue has been automatically closed because it has not had recent activity. Please, reopen if you need.