From 01a4c08b687b9db34a4c883e0c2028fce847919b Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Tue, 9 Dec 2025 01:45:14 +0000 Subject: [PATCH 1/6] feat(scripts): add --with-tasks flag to develop.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a --with-tasks flag to develop.sh that automatically sets up a tasks-compatible development environment. When enabled, it creates the tasks-docker template and pulls the required container image in the background to speed up workspace creation. The flag also sets a blank access URL to enable tunnel mode, which provides automatic subdomain support for workspace apps without requiring wildcard-access-url configuration. Updated the dogfood template to use this flag by default, making it easier to develop Coder Tasks features using Tasks itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- dogfood/coder/main.tf | 2 +- scripts/develop.sh | 48 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 2c6ba9d998957..7382431f36b0d 100644 --- a/dogfood/coder/main.tf +++ b/dogfood/coder/main.tf @@ -924,7 +924,7 @@ resource "coder_script" "develop_sh" { echo "Waiting for agent startup script to finish... ($attempt/60)" sleep 10 done - cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh --; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' + cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh --with-tasks --; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' EOT } diff --git a/scripts/develop.sh b/scripts/develop.sh index 8df69bfc111d9..49f016b4752d2 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -1,9 +1,12 @@ #!/usr/bin/env bash -# Usage: ./develop.sh [--agpl] +# Usage: ./develop.sh [--agpl] [--with-tasks] # # If the --agpl parameter is specified, builds only the AGPL-licensed code (no # Coder enterprise features). +# +# If the --with-tasks parameter is specified, creates the tasks-docker template +# and pulls the container image in the background. SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") # shellcheck source=scripts/lib.sh @@ -20,13 +23,14 @@ DEFAULT_PASSWORD="SomeSecurePassword!" password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" use_proxy=0 multi_org=0 +with_tasks=0 # Ensure that extant environment variables do not override # the config dir we use to override auth for dev.coder.com. unset CODER_SESSION_TOKEN unset CODER_URL -args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization -- "$@")" +args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization,with-tasks -- "$@")" eval set -- "$args" while true; do case "$1" in @@ -50,6 +54,10 @@ while true; do multi_org=1 shift ;; + --with-tasks) + with_tasks=1 + shift + ;; --debug) debug=1 shift @@ -76,6 +84,11 @@ if [ -n "${CODER_AGENT_URL:-}" ]; then DEVELOP_IN_CODER=1 fi +# When using --with-tasks, use blank access URL to enable tunnel mode +if [ "${with_tasks}" -gt "0" ]; then + CODER_DEV_ACCESS_URL="" +fi + # Preflight checks: ensure we have our required dependencies, and make sure nothing is listening on port 3000 or 8080 dependencies curl git go jq make pnpm @@ -258,6 +271,37 @@ fatal() { ) || echo "Failed to create a template. The template files are in ${temp_template_dir}" fi + # If --with-tasks flag is set and docker is available, create the tasks-docker template + if [ "${with_tasks}" -gt "0" ]; then + template_name="tasks-docker" + if docker info >/dev/null 2>&1 && ! "${CODER_DEV_SHIM}" templates versions list "${template_name}" >/dev/null 2>&1; then + echo "Initializing tasks-docker template..." + + # Pull the container image in the background to speed up workspace creation + container_image="codercom/example-universal:ubuntu" + echo "Pulling container image ${container_image} in background..." + docker pull "${container_image}" >/dev/null 2>&1 & + + # Create template from the examples directory + temp_template_dir="$(mktemp -d)" + cp -r "${PROJECT_ROOT}/examples/templates/tasks-docker/"* "${temp_template_dir}/" + + # Run terraform init + pushd "${temp_template_dir}" && terraform init && popd + + DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" + ( + echo "Pushing tasks-docker template to '${first_org_name}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --yes --org "${first_org_name}" + if [ "${multi_org}" -gt "0" ]; then + echo "Pushing tasks-docker template to '${another_org}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --yes --org "${another_org}" + fi + rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds + ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}" + fi + fi + if [ "${use_proxy}" -gt "0" ]; then log "Using external workspace proxy" ( From c5f9e309cea72a14eab17ea3938ab978d5f4dd06 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Tue, 9 Dec 2025 20:47:11 +0000 Subject: [PATCH 2/6] fix(scripts): pass docker_socket variable to tasks-docker template The DOCKER_HOST variable was being set but not passed to the template. This commit: - Creates params.yaml with docker_socket parameter - Passes params.yaml via --variables-file flag to both template pushes - Adds docker_socket variable to tasks-docker template matching docker template pattern This ensures the template can connect to non-default Docker sockets when needed. --- examples/templates/tasks-docker/main.tf | 11 ++++++++++- scripts/develop.sh | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/templates/tasks-docker/main.tf b/examples/templates/tasks-docker/main.tf index 96e98cb917e67..e29a8091f04d3 100644 --- a/examples/templates/tasks-docker/main.tf +++ b/examples/templates/tasks-docker/main.tf @@ -10,12 +10,21 @@ terraform { } } +variable "docker_socket" { + default = "" + description = "(Optional) Docker socket URI" + type = string +} + # This template requires a valid Docker socket # However, you can reference our Kubernetes/VM # example templates and adapt the Claude Code module # # See: https://registry.coder.com/templates -provider "docker" {} +provider "docker" { + # Defaulting to null if the variable is an empty string lets us have an optional variable without having to set our own default + host = var.docker_socket != "" ? var.docker_socket : null +} # A `coder_ai_task` resource enables Tasks and associates # the task with the coder_app that will act as an AI agent. diff --git a/scripts/develop.sh b/scripts/develop.sh index 49f016b4752d2..b23d16927955d 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -290,12 +290,13 @@ fatal() { pushd "${temp_template_dir}" && terraform init && popd DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" + printf 'docker_socket: "%s"\n' "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" ( echo "Pushing tasks-docker template to '${first_org_name}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --yes --org "${first_org_name}" + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" if [ "${multi_org}" -gt "0" ]; then echo "Pushing tasks-docker template to '${another_org}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --yes --org "${another_org}" + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" fi rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}" From c575b84cdc1e9e3f0d7046cb98975bb83db61239 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Wed, 10 Dec 2025 14:58:31 +0000 Subject: [PATCH 3/6] feat: create both docker and tasks-docker templates by default Per Dean's feedback, remove the --with-tasks flag and always create both the docker and tasks-docker templates in develop.sh. This provides a better developer experience by making the tasks-docker template available without requiring a flag. Changes: - Remove --with-tasks flag and associated argument parsing - Always create both docker and tasks-docker templates when docker is available - Pull container image in background for tasks-docker to speed up workspace creation - Update dogfood template to remove --with-tasks usage (no longer needed) --- dogfood/coder/main.tf | 2 +- scripts/develop.sh | 74 +++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 42 deletions(-) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 7382431f36b0d..3ab5306824a8c 100644 --- a/dogfood/coder/main.tf +++ b/dogfood/coder/main.tf @@ -924,7 +924,7 @@ resource "coder_script" "develop_sh" { echo "Waiting for agent startup script to finish... ($attempt/60)" sleep 10 done - cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh --with-tasks --; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' + cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' EOT } diff --git a/scripts/develop.sh b/scripts/develop.sh index b23d16927955d..7d240a1dc484a 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -1,12 +1,9 @@ #!/usr/bin/env bash -# Usage: ./develop.sh [--agpl] [--with-tasks] +# Usage: ./develop.sh [--agpl] # # If the --agpl parameter is specified, builds only the AGPL-licensed code (no # Coder enterprise features). -# -# If the --with-tasks parameter is specified, creates the tasks-docker template -# and pulls the container image in the background. SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") # shellcheck source=scripts/lib.sh @@ -23,14 +20,13 @@ DEFAULT_PASSWORD="SomeSecurePassword!" password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" use_proxy=0 multi_org=0 -with_tasks=0 # Ensure that extant environment variables do not override # the config dir we use to override auth for dev.coder.com. unset CODER_SESSION_TOKEN unset CODER_URL -args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization,with-tasks -- "$@")" +args="$(getopt -o "" -l access-url:,use-proxy,agpl,debug,password:,multi-organization -- "$@")" eval set -- "$args" while true; do case "$1" in @@ -54,10 +50,6 @@ while true; do multi_org=1 shift ;; - --with-tasks) - with_tasks=1 - shift - ;; --debug) debug=1 shift @@ -84,11 +76,6 @@ if [ -n "${CODER_AGENT_URL:-}" ]; then DEVELOP_IN_CODER=1 fi -# When using --with-tasks, use blank access URL to enable tunnel mode -if [ "${with_tasks}" -gt "0" ]; then - CODER_DEV_ACCESS_URL="" -fi - # Preflight checks: ensure we have our required dependencies, and make sure nothing is listening on port 3000 or 8080 dependencies curl git go jq make pnpm @@ -271,36 +258,41 @@ fatal() { ) || echo "Failed to create a template. The template files are in ${temp_template_dir}" fi - # If --with-tasks flag is set and docker is available, create the tasks-docker template - if [ "${with_tasks}" -gt "0" ]; then - template_name="tasks-docker" - if docker info >/dev/null 2>&1 && ! "${CODER_DEV_SHIM}" templates versions list "${template_name}" >/dev/null 2>&1; then - echo "Initializing tasks-docker template..." + # Also create the tasks-docker template if docker is available + template_name="tasks-docker" + # Determine the name of the default org with some jq hacks! + first_org_name=$("${CODER_DEV_SHIM}" organizations show me -o json | jq -r '.[] | select(.is_default) | .name') + if docker info >/dev/null 2>&1 && ! "${CODER_DEV_SHIM}" templates versions list "${template_name}" >/dev/null 2>&1; then + # sometimes terraform isn't installed yet when we go to create the + # template + echo "Waiting for terraform to be installed..." + sleep 5 - # Pull the container image in the background to speed up workspace creation - container_image="codercom/example-universal:ubuntu" - echo "Pulling container image ${container_image} in background..." - docker pull "${container_image}" >/dev/null 2>&1 & + echo "Initializing tasks-docker template..." - # Create template from the examples directory - temp_template_dir="$(mktemp -d)" - cp -r "${PROJECT_ROOT}/examples/templates/tasks-docker/"* "${temp_template_dir}/" + # Pull the container image in the background to speed up workspace creation + container_image="codercom/example-universal:ubuntu" + echo "Pulling container image ${container_image} in background..." + docker pull "${container_image}" >/dev/null 2>&1 & - # Run terraform init - pushd "${temp_template_dir}" && terraform init && popd + # Create template from the examples directory + temp_template_dir="$(mktemp -d)" + cp -r "${PROJECT_ROOT}/examples/templates/tasks-docker/"* "${temp_template_dir}/" - DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" - printf 'docker_socket: "%s"\n' "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" - ( - echo "Pushing tasks-docker template to '${first_org_name}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" - if [ "${multi_org}" -gt "0" ]; then - echo "Pushing tasks-docker template to '${another_org}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" - fi - rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds - ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}" - fi + # Run terraform init so we get a terraform.lock.hcl + pushd "${temp_template_dir}" && terraform init && popd + + DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" + printf 'docker_socket: "%s"\n' "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" + ( + echo "Pushing tasks-docker template to '${first_org_name}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" + if [ "${multi_org}" -gt "0" ]; then + echo "Pushing tasks-docker template to '${another_org}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" + fi + rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds + ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}" fi if [ "${use_proxy}" -gt "0" ]; then From f98cf44f75ef4f13859c2a9b61c10ebeb57a2904 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Wed, 10 Dec 2025 15:13:06 +0000 Subject: [PATCH 4/6] revert: restore dogfood/coder/main.tf to main branch state The main.tf changes were unrelated to this PR. Reverting to match main branch exactly. --- dogfood/coder/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dogfood/coder/main.tf b/dogfood/coder/main.tf index 3ab5306824a8c..2c6ba9d998957 100644 --- a/dogfood/coder/main.tf +++ b/dogfood/coder/main.tf @@ -924,7 +924,7 @@ resource "coder_script" "develop_sh" { echo "Waiting for agent startup script to finish... ($attempt/60)" sleep 10 done - cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' + cd "${local.repo_dir}" && screen -dmS develop_sh /bin/sh -c 'while true; do ./scripts/develop.sh --; echo "develop.sh exited with code $? restarting in 30s"; sleep 30; done' EOT } From 397efa8fb7437a1416e8ce20160e48b1ce688998 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Wed, 10 Dec 2025 18:23:53 +0000 Subject: [PATCH 5/6] refactor: extract template pushing logic into shared function Addresses Dean's code review feedback: - Remove redundant first_org_name variable in tasks-docker section (already defined in docker section above) - Extract template pushing logic into a shared push_template() function to reduce code duplication between docker and tasks-docker template creation --- scripts/develop.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/develop.sh b/scripts/develop.sh index 7d240a1dc484a..16da0b1d41586 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -164,6 +164,20 @@ fatal() { echo "== FAIL: $*" >&2 kill -INT $ppid >/dev/null 2>&1 } +push_template() { + local template_name=$1 + local temp_template_dir=$2 + local first_org_name=$3 + local another_org=$4 + + echo "Pushing ${template_name} template to '${first_org_name}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" + if [ "${multi_org}" -gt "0" ]; then + echo "Pushing ${template_name} template to '${another_org}'..." + "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" + fi + rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds +} # This is a way to run multiple processes in parallel, and have Ctrl-C work correctly # to kill both at the same time. For more details, see: @@ -248,20 +262,12 @@ fatal() { DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" printf 'docker_arch: "%s"\ndocker_host: "%s"\n' "${GOARCH}" "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" ( - echo "Pushing docker template to '${first_org_name}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" - if [ "${multi_org}" -gt "0" ]; then - echo "Pushing docker template to '${another_org}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" - fi - rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds + push_template "${template_name}" "${temp_template_dir}" "${first_org_name}" "${another_org}" ) || echo "Failed to create a template. The template files are in ${temp_template_dir}" fi # Also create the tasks-docker template if docker is available template_name="tasks-docker" - # Determine the name of the default org with some jq hacks! - first_org_name=$("${CODER_DEV_SHIM}" organizations show me -o json | jq -r '.[] | select(.is_default) | .name') if docker info >/dev/null 2>&1 && ! "${CODER_DEV_SHIM}" templates versions list "${template_name}" >/dev/null 2>&1; then # sometimes terraform isn't installed yet when we go to create the # template @@ -285,13 +291,7 @@ fatal() { DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" printf 'docker_socket: "%s"\n' "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" ( - echo "Pushing tasks-docker template to '${first_org_name}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" - if [ "${multi_org}" -gt "0" ]; then - echo "Pushing tasks-docker template to '${another_org}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" - fi - rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds + push_template "${template_name}" "${temp_template_dir}" "${first_org_name}" "${another_org}" ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}" fi From 8b5fa35b70b24ed226380b009f5276185ccc5af3 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Wed, 10 Dec 2025 18:28:20 +0000 Subject: [PATCH 6/6] fix: remove unnecessary docker_socket variable from tasks-docker template The tasks-docker example template doesn't need custom docker socket configuration - it works fine with the default docker provider configuration. Removed the docker_socket variable addition and updated push_template() function to optionally use params.yaml only when it exists. --- examples/templates/tasks-docker/main.tf | 11 +---------- scripts/develop.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/examples/templates/tasks-docker/main.tf b/examples/templates/tasks-docker/main.tf index e29a8091f04d3..96e98cb917e67 100644 --- a/examples/templates/tasks-docker/main.tf +++ b/examples/templates/tasks-docker/main.tf @@ -10,21 +10,12 @@ terraform { } } -variable "docker_socket" { - default = "" - description = "(Optional) Docker socket URI" - type = string -} - # This template requires a valid Docker socket # However, you can reference our Kubernetes/VM # example templates and adapt the Claude Code module # # See: https://registry.coder.com/templates -provider "docker" { - # Defaulting to null if the variable is an empty string lets us have an optional variable without having to set our own default - host = var.docker_socket != "" ? var.docker_socket : null -} +provider "docker" {} # A `coder_ai_task` resource enables Tasks and associates # the task with the coder_app that will act as an AI agent. diff --git a/scripts/develop.sh b/scripts/develop.sh index 16da0b1d41586..d1554ffc92eea 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -169,12 +169,18 @@ push_template() { local temp_template_dir=$2 local first_org_name=$3 local another_org=$4 + local params_file="${temp_template_dir}/params.yaml" + + local push_args="--directory ${temp_template_dir}" + if [ -f "${params_file}" ]; then + push_args="${push_args} --variables-file ${params_file}" + fi echo "Pushing ${template_name} template to '${first_org_name}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${first_org_name}" + "${CODER_DEV_SHIM}" templates push "${template_name}" ${push_args} --yes --org "${first_org_name}" if [ "${multi_org}" -gt "0" ]; then echo "Pushing ${template_name} template to '${another_org}'..." - "${CODER_DEV_SHIM}" templates push "${template_name}" --directory "${temp_template_dir}" --variables-file "${temp_template_dir}/params.yaml" --yes --org "${another_org}" + "${CODER_DEV_SHIM}" templates push "${template_name}" ${push_args} --yes --org "${another_org}" fi rm -rfv "${temp_template_dir}" # Only delete template dir if template creation succeeds } @@ -288,8 +294,6 @@ push_template() { # Run terraform init so we get a terraform.lock.hcl pushd "${temp_template_dir}" && terraform init && popd - DOCKER_HOST="$(docker context inspect --format '{{ .Endpoints.docker.Host }}')" - printf 'docker_socket: "%s"\n' "${DOCKER_HOST}" >"${temp_template_dir}/params.yaml" ( push_template "${template_name}" "${temp_template_dir}" "${first_org_name}" "${another_org}" ) || echo "Failed to create tasks-docker template. The template files are in ${temp_template_dir}"