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

Composer cache gets cleared everytime #361

Open
Axel29 opened this issue May 2, 2023 · 0 comments
Open

Composer cache gets cleared everytime #361

Axel29 opened this issue May 2, 2023 · 0 comments

Comments

@Axel29
Copy link

Axel29 commented May 2, 2023

Preconditions

  1. Magento Cloud Docker with PHP >= 8.1

Steps to reproduce

  1. Executing any Docker command within a PHP container such as bin/magento-docker bash
  2. Check out the output

Expected result

  1. No cache is cleared

Actual result

  1. Full composer cache gets cleared

Additional information

This is due to the fact that the docker-entrypoint.sh has the following lines now:

# Configure composer
[ ! -z "${COMPOSER_VERSION}" ] && \
    composer clearcache && \
    composer self-update $COMPOSER_VERSION

because of that, Composer's cache is always cleared when the COMPOSER_VERSION environment variable is set.

This is very annoying since by default the local (host machine) Composer cache directory is a volume to the Docker's Composer cache directory, meaning that Magento Cloud Docker would clear the entire Composer cache everytime we run any command that runs the PHP container...

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

No branches or pull requests

1 participant