lorisleiva / laravel-docker

🐳 Generic docker image for Laravel Applications
MIT License
927 stars 312 forks source link

Error running composer install #102

Closed iraldoad closed 2 years ago

iraldoad commented 2 years ago

I am getting this error in my pipelines when running composer install. Last week it worked without errors. I found that if I remove the artifacts and the cache, it works. Please, help.

imagen

GitlabCI

stages:
  - build
  - test
  - deploy

image: lorisleiva/laravel-docker:8.0

services:
  - postgres:13.4-alpine
  - redis:6.2.5-alpine

build:
  stage: build
  script:
    - cp .env.testing.example .env
    - cp .env.testing.example .env.testing
    - composer install
    - php artisan l5-swagger:generate
    - php artisan config:cache
    - php artisan route:cache
    - php artisan view:cache
  artifacts:
    expire_in: 1 month
    paths:
      - vendor/
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - vendor/

phpunit:
  stage: test
  dependencies:
    - build
  script:
    - php artisan migrate --seed
    - phpunit --coverage-text --colors=never

codestyle:
  stage: test
  dependencies: []
  script:
    - phpcs
lorisleiva commented 2 years ago

Hi there 👋

Thanks for raising this, I think this is due to the fact that the global composer folder has changed recently on this image. Once you clear your cache on the pipeline, it should work properly.

iraldoad commented 2 years ago

Thank you very much for your advice. it works now 👍.