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

fix: Allow using cache when running in Docker distribution #7769

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

Wirone
Copy link
Member

@Wirone Wirone commented Jan 22, 2024

Fixes #7768.


docker build --target dist -t fixer:local .
docker run --rm -it -v $(pwd):/code --entrypoint="" fixer:local sh

/code # php-cs-fixer check
PHP CS Fixer 3.48.1-DEV Small Changes by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.3.2
Loaded config default from "/code/.php-cs-fixer.php".
 1070/1070 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


Found 0 of 1070 files that can be fixed in 40.647 seconds, 26.000 MB memory used

/code # php-cs-fixer check
PHP CS Fixer 3.48.1-DEV Small Changes by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.3.2
Loaded config default from "/code/.php-cs-fixer.php".
Using cache file "/code/.php-cs-fixer.cache.json".
 1070/1070 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


Found 0 of 1070 files that can be fixed in 0.136 seconds, 16.000 MB memory used

Second run inside Docker container uses cache.

@Wirone Wirone added kind/bug topic/docker Docker distribution, development runtime labels Jan 22, 2024
@Wirone Wirone self-assigned this Jan 22, 2024
@coveralls
Copy link

coveralls commented Jan 22, 2024

Coverage Status

coverage: 94.749% (-0.003%) from 94.752%
when pulling 8820d70 on Wirone:codito/cache-in-docker
into 156192d on PHP-CS-Fixer:master.

@Wirone Wirone enabled auto-merge (squash) January 31, 2024 06:42
@Wirone Wirone disabled auto-merge January 31, 2024 06:42
@Wirone Wirone enabled auto-merge (squash) January 31, 2024 06:43
@Wirone Wirone merged commit 8056c29 into PHP-CS-Fixer:master Jan 31, 2024
27 checks passed
@Wirone Wirone deleted the codito/cache-in-docker branch January 31, 2024 06:54
danog pushed a commit to zoonru/PHP-CS-Fixer that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug topic/docker Docker distribution, development runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache is not supported using the official docker image
3 participants