-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (50 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
59 lines (50 loc) · 1.36 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
53
54
55
56
57
58
59
version: '3.8'
services:
kubernetes-workshop:
build:
context: ./setup
dockerfile: Dockerfile
image: k8s-workshop-tools:latest
container_name: k8s-workshop
hostname: k8s-workshop
# Privileged mode required for kind/podman inside container
privileged: true
# Security options for nested containers
security_opt:
- label=disable
- apparmor=unconfined
# Mount Docker socket (alternative to Podman)
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./:/workspace:Z
- workshop-data:/root/.kube
- workshop-cache:/root/.cache
# Port mappings for workshop services
ports:
- "8080:80" # HTTP services
- "8443:443" # HTTPS services
- "30000:30000" # NodePort range start
- "30001:30001"
- "30002:30002"
# Environment variables
environment:
- KIND_EXPERIMENTAL_PROVIDER=docker
- KUBECONFIG=/root/.kube/config
- DOCKER_HOST=unix:///var/run/docker.sock
# Keep container running
stdin_open: true
tty: true
# Resource limits (adjust based on your system)
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4G
volumes:
workshop-data:
driver: local
workshop-cache:
driver: local