From fe4c4122c9ee25908371d533c4c93dcea454bc99 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 30 Apr 2025 17:01:22 +0300 Subject: [PATCH] fix(dogfood/coder): increase in-container docker daemon shutdown timeout (#17617) The default is 10 seconds and will not successfully clean up large devcontainers inside the workspace. Follow-up to #17528 --- dogfood/coder/main.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 92f25cb13f..ddfd1f8e95 100644 --- a/dogfood/coder/main.tf +++ b/dogfood/coder/main.tf @@ -353,6 +353,10 @@ resource "coder_agent" "dev" { # Allow synchronization between scripts. trap 'touch /tmp/.coder-startup-script.done' EXIT + # Increase the shutdown timeout of the docker service for improved cleanup. + # The 240 was picked as it's lower than the 300 seconds we set for the + # container shutdown grace period. + sudo sh -c 'jq ". += {\"shutdown-timeout\": 240}" /etc/docker/daemon.json > /tmp/daemon.json.new && mv /tmp/daemon.json.new /etc/docker/daemon.json' # Start Docker service sudo service docker start # Install playwright dependencies