cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1.03k stars 380 forks source link

docs: prevent orphaned containers testing locally #1225

Closed MikeMcC399 closed 1 month ago

MikeMcC399 commented 1 month ago

Issue

When following the instructions in CONTRIBUTING > Building locally, shown condensed below, using Docker Desktop 4.33.0 and above, repeating the docker compose run command leads to a warning "Found orphan containers"

Instructions

cd factory
docker compose build factory
docker compose build included
cd test-project
set -a && . ../.env && set +a
docker compose run test-factory-all-included

Warning

WARN[0000] Found orphan containers ([test-project-test-factory-all-included-run-fbb451183daf]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.

Change

In CONTRIBUTING > Building locally change the instruction to the following, using the option --rm (Automatically remove the container when it exits), to avoid leaving an orphaned container behind:

docker compose run --rm test-factory-all-included
cypress-app-bot commented 1 month ago