Skip to content

Commit fe4c412

Browse files
authored
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
1 parent 650a48c commit fe4c412

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dogfood/coder/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ resource "coder_agent" "dev" {
353353
# Allow synchronization between scripts.
354354
trap 'touch /tmp/.coder-startup-script.done' EXIT
355355
356+
# Increase the shutdown timeout of the docker service for improved cleanup.
357+
# The 240 was picked as it's lower than the 300 seconds we set for the
358+
# container shutdown grace period.
359+
sudo sh -c 'jq ". += {\"shutdown-timeout\": 240}" /etc/docker/daemon.json > /tmp/daemon.json.new && mv /tmp/daemon.json.new /etc/docker/daemon.json'
356360
# Start Docker service
357361
sudo service docker start
358362
# Install playwright dependencies

0 commit comments

Comments
 (0)