We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentcc61eff commit343d1c1Copy full SHA for 343d1c1
examples/templates/docker-devcontainer/main.tf
@@ -54,10 +54,6 @@ resource "coder_agent" "main" {
54
fi
55
56
if [ "$${CODER_AGENT_URL#*host.docker.internal}" != "$CODER_AGENT_URL" ]; then
57
- # Start the docker service if it is not running, this will create
58
- # the "docker0" interface if it does not exist.
59
- sudo service docker start
60
-
61
# If the access URL is host.docker.internal, we set up forwarding
62
# to the host Docker gateway IP address, which is typically
63
# 172.17.0.1, this will allow the devcontainers to access the
@@ -85,6 +81,10 @@ resource "coder_agent" "main" {
85
81
;;
86
82
esac
87
83
84
+ # Start the docker service if it is not running, this will create
+ # the "docker0" interface if it does not exist.
+ sudo service docker start
+
88
# Since we cannot define "--add-host" for devcontainers, we define
89
# a dnsmasq configuration that allows devcontainers to resolve the
90
# host.docker.internal URL to this workspace, which is typically