Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GItlab ci: Composer cache permission denied #386

Open
rophini92 opened this issue Apr 11, 2024 · 1 comment
Open

GItlab ci: Composer cache permission denied #386

rophini92 opened this issue Apr 11, 2024 · 1 comment

Comments

@rophini92
Copy link

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!

@mistraloz
Copy link
Collaborator

mistraloz commented Apr 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants