From be90d2021dff5e136c48dc6d901cfa5a6e00bfa4 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 30 Apr 2025 16:55:19 +0300 Subject: [PATCH] fix(dogfood/coder): increase in-container docker daemon shutdown timeout The default is 10 seconds and will not successfully clean up large devcontainers inside the workspace. --- dogfood/coder/main.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 92f25cb13f62b..ddfd1f8e95e3d 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