Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3dbd424

Browse files
authored
fix(dogfood/coder): stop docker containers and prune system on shutdown (#17904)
This change adds docker stop and docker system prune to the shutdown script so that it doesn't need to be done by the Docker host which will take a lot longer.This change greatly speeds up workspace destruction:```2025-05-19 12:26:57.046+03:00 docker_container.workspace[0]: Destroying... [id=2685e2f456ba7b280c420219f19ef15384faa52c61ba7c087c7f109ffa6b1bda]2025-05-19 12:27:07.046+03:00 docker_container.workspace[0]: Still destroying... [10s elapsed]2025-05-19 12:27:16.734+03:00 docker_container.workspace[0]: Destruction complete after 20s```Follow-up for#17110
1 parent98e2ec4 commit3dbd424

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎dogfood/coder/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,17 @@ resource "coder_agent" "dev" {
373373
#!/usr/bin/env bash
374374
set -eux -o pipefail
375375
376+
# Stop all running containers and prune the system to clean up
377+
# /var/lib/docker to prevent errors during workspace destroy.
378+
#
379+
# WARNING! This will remove:
380+
# - all containers
381+
# - all networks
382+
# - all images
383+
# - all build cache
384+
docker ps -q | xargs docker stop
385+
docker system prune -a
386+
376387
# Stop the Docker service to prevent errors during workspace destroy.
377388
sudo service docker stop
378389
EOT

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp