forked from myugan/firecracker-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
52 lines (50 loc) · 1.37 KB
/
docker-compose.test.yml
File metadata and controls
52 lines (50 loc) · 1.37 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
services:
firecracker-test:
build:
context: .
dockerfile: Dockerfile.test
container_name: firecracker-python-test
hostname: firecracker-test
privileged: true
# Required for KVM access
devices:
- /dev/kvm:/dev/kvm
- /dev/net/tun:/dev/net/tun
# Required for Docker-in-Docker (for Docker image tests)
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
# Mount project directory for development
- .:/workspace
# Persist Firecracker data
- firecracker-data:/var/lib/firecracker
- firecracker-snapshots:/var/lib/firecracker/snapshots
# Preserve uv cache
- uv-cache:/root/.local/share/uv
# Network configuration - use bridge mode instead of host
networks:
- firecracker-net
# Add extra hosts for networking if needed
extra_hosts:
- "host.docker.internal:host-gateway"
# Environment variables
environment:
- PYTHONUNBUFFERED=1
- UV_CACHE_DIR=/root/.local/share/uv
# Working directory
working_dir: /workspace
# Keep container running
stdin_open: true
tty: true
# Command to run when container starts
command: /bin/bash
volumes:
firecracker-data:
driver: local
firecracker-snapshots:
driver: local
uv-cache:
driver: local
networks:
firecracker-net:
driver: bridge