From 6ffa02145de3f12399697cbc3a488a8b6fe42da8 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Sep 2024 21:20:37 +0100 Subject: [PATCH] chore(docs/docker.md): update docs for DinD with Coder (#346) (cherry picked from commit 287080c6659b9abe7a4a4f635c08cc9de2b814ee) --- docs/docker.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docker.md b/docs/docker.md index 4ed032e3..ca09c724 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -1,7 +1,23 @@ # Docker inside Envbuilder There are a number of approaches you can use to have access to a Docker daemon -from inside Envbuilder: +from inside Envbuilder. + +> Note: some of the below methods involve setting `ENVBUILDER_INIT_SCRIPT` to +> work around the lack of an init system inside the Docker container. +> If you are attempting to use the below approaches with [Coder](https://github.com/coder/coder), +> you may need to instead add the relevant content of the init script to your +> agent startup script in your template. +> For example: +> ``` +> resource "coder_agent" "dev" { +> ... +> startup_script = <<-EOT +> set -eux -o pipefail +> nohup dockerd > /var/log/docker.log 2>&1 & +> EOT +> } +> ``` ## Docker Outside of Docker (DooD)