-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
35 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Dev container stack. Compose publishes ports on the host (more reliable than
# devcontainer forwardPorts in some setups). Interpolation vars (SSH_PORT, etc.)
# can be set in `.devcontainer/.env` (see `.devcontainer/.env.example`).
#
# Internal SSH: devcontainers `sshd` feature listens on 2222, not 22 — map host:2222.
#
# Explicit DNS: containers on external networks (e.g. `dev`) sometimes get no working resolver
# and `uv pip` fails with "dns error" / "failed to lookup address information".
# Override in `.devcontainer/.env`: DEVCONTAINER_DNS_1 / DEVCONTAINER_DNS_2.
services:
devcontainer:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
dns:
- "${DEVCONTAINER_DNS_1:-1.1.1.1}"
- "${DEVCONTAINER_DNS_2:-8.8.8.8}"
env_file:
- ../.env
environment:
# Avoid ~/.cache/uv (often root-owned after sshd/common-utils); workspace is bind-mounted as vscode.
UV_CACHE_DIR: /workspaces/project/.uv-cache
ports:
- "${SSH_PORT:-2222}:2222"
- "${APP_PORT:-1234}:1234"
- "${DEV_PORT:-8888}:8888"
volumes:
- ..:/workspaces/project:cached
command: sleep infinity
networks:
- dev
networks:
dev:
external: true