summaryrefslogtreecommitdiffstatshomepage
path: root/package.json
diff options
context:
space:
mode:
authorJonathan Desrosiers <desrosj@git.wordpress.org>2024-11-12 17:44:38 +0000
committerJonathan Desrosiers <desrosj@git.wordpress.org>2024-11-12 17:44:38 +0000
commit44e6c75ff94b6f05ce8dd404237b1a2badf8e8e9 (patch)
treea3c792abb2e9c629d185a4a10daae1ae2700bfbc /package.json
parented0ad98bc408a4abaeda00faf00be87159635d1e (diff)
downloadwordpress-44e6c75ff94b6f05ce8dd404237b1a2badf8e8e9.tar.gz
wordpress-44e6c75ff94b6f05ce8dd404237b1a2badf8e8e9.zip
Build/Test Tools: Prevent orphaned Docker containers.
This updates certain local Docker environment commands to include `--rm`, which instructs `docker compose` to remove the container after running the specified scripts. Previously only the installation script contained `--rm`. But running `test:php`, `env:start`, or `env:cli` resulted in the container remaining. Props johnbillion. Fixes #62395. git-svn-id: https://develop.svn.wordpress.org/trunk@59393 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'package.json')
-rw-r--r--package.json6
1 files changed, 3 insertions, 3 deletions
diff --git a/package.json b/package.json
index f05290283a..e5d1a3729e 100644
--- a/package.json
+++ b/package.json
@@ -179,17 +179,17 @@
"grunt": "grunt",
"lint:jsdoc": "wp-scripts lint-js",
"lint:jsdoc:fix": "wp-scripts lint-js --fix",
- "env:start": "node ./tools/local-env/scripts/start.js && node ./tools/local-env/scripts/docker.js run -T php composer update -W",
+ "env:start": "node ./tools/local-env/scripts/start.js && node ./tools/local-env/scripts/docker.js run -T --rm php composer update -W",
"env:stop": "node ./tools/local-env/scripts/docker.js down",
"env:restart": "npm run env:stop && npm run env:start",
"env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
"env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
"env:install": "node ./tools/local-env/scripts/install.js",
- "env:cli": "node ./tools/local-env/scripts/docker.js run cli",
+ "env:cli": "node ./tools/local-env/scripts/docker.js run --rm cli",
"env:logs": "node ./tools/local-env/scripts/docker.js logs",
"env:pull": "node ./tools/local-env/scripts/docker.js pull",
"test:performance": "wp-scripts test-playwright --config tests/performance/playwright.config.js",
- "test:php": "node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit",
+ "test:php": "node ./tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit",
"test:coverage": "npm run test:php -- --coverage-html ./coverage/html/ --coverage-php ./coverage/php/report.php --coverage-text=./coverage/text/report.txt",
"test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js",
"test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",