Skip to content

Commit 9771d8f

Browse files
committed
docs: add cleanup to guide for start from scratch
1 parent e4c881e commit 9771d8f

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

docs/getting-started/from-scratch.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,35 @@ git push
9292
bin/magento --version
9393
```
9494

95+
7. Cleanup resources for the environment
96+
97+
:::info
98+
This is only necessary if you're never using the devcontainer ever again. If you want to return to the environment at a later time, you can just close VS Code and reopen the devcontainer later to start where you left off.
99+
:::
100+
101+
:::danger
102+
This is destructive. Please
103+
:::
104+
```bash
105+
## List the relevant containers for review
106+
docker ps -a --format '{{.ID}} {{.Names}}' \
107+
| awk '$2 ~ /^magento2-devcontainer-/'
108+
109+
## Stop and remove those containers
110+
docker ps -a --format '{{.ID}} {{.Names}}' \
111+
| awk '$2 ~ /^magento2-devcontainer-/ {print $1}' \
112+
| xargs -r docker rm
113+
114+
## List the relevant volumes for review.
115+
docker volume ls --format '{{.Name}}' \
116+
| awk '/^magento2-devcontainer_/'
117+
118+
# Stop and remove the created volumes
119+
docker volume ls --format '{{.Name}}' \
120+
| awk '/^magento2-devcontainer_/' \
121+
| xargs -r docker volume rm
122+
```
123+
95124
## Next Steps
96125

97126
- [Docker Compose Configuration](/customization/docker-compose) - Customize your environment

0 commit comments

Comments
 (0)