8000 fix: example: update docker-local to use host-gateway · coder/coder@e699ba1 · GitHub
[go: up one dir, main page]

Skip to content

Commit e699ba1

Browse files
committed
fix: example: update docker-local to use host-gateway
1 parent 55bd7aa commit e699ba1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docker-compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ services:
77
environment:
88
CODER_PG_CONNECTION_URL: "postgresql://username:password@database/coder?sslmode=disable"
99
CODER_ADDRESS: "0.0.0.0:7080"
10+
CODER_ACCESS_URL: "http://host.docker.internal:7080"
11+
volumes:
12+
- /var/run/docker.sock:/var/run/docker.sock
1013
depends_on:
1114
database:
1215
condition: service_healthy

examples/docker-local/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ resource "docker_container" "workspace" {
4343
dns = ["1.1.1.1"]
4444
command = ["sh", "-c", coder_agent.dev.init_script]
4545
env = ["CODER_AGENT_TOKEN=${coder_agent.dev.token}"]
46+
host {
47+
host = "host.docker.internal"
48+
ip = "host-gateway"
49+
}
4650
volumes {
4751
container_path = "/home/coder/"
4852
volume_name = docker_volume.coder_volume.name

0 commit comments

Comments
 (0)
0