-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
77 lines (73 loc) · 2.16 KB
/
docker-compose.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
services:
binary:
image: metacall/builder_binary
container_name: metacall_builder_binary
build:
context: .
dockerfile: Dockerfile
target: builder_binary
entrypoint: /builder ${BUILDER_ARGS:-}
rootless:
image: metacall/builder_rootless
container_name: metacall_builder_rootless
build:
context: .
dockerfile: Dockerfile
target: builder_rootless
entrypoint: /home/user/builder.sh ${BUILDER_ARGS:-}
# entrypoint: /bin/sh -c "sleep infinity"
environment:
IMPORT_REGISTRY: ${IMPORT_REGISTRY:-registry:5000/metacall/builder_startup} # Default won't be needed once we copy the script
EXPORT_REGISTRY: ${EXPORT_REGISTRY:-registry:5000/metacall/builder_dump}
security_opt:
- "seccomp=unconfined"
- "apparmor=unconfined"
# network_mode: "host"
depends_on:
registry:
condition: service_healthy
client:
image: metacall/builder_client
container_name: metacall_builder_client
build:
context: .
dockerfile: Dockerfile
target: builder_client
entrypoint: /home/builder.sh ${BUILDER_ARGS:-}
environment:
IMPORT_REGISTRY: ${IMPORT_REGISTRY:-testing}
EXPORT_REGISTRY: ${EXPORT_REGISTRY:-testing}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# - buildkit:/run/user/1000/buildkit/buildkitd.sock
depends_on:
buildkit:
condition: service_healthy
registry:
condition: service_healthy
buildkit:
image: moby/buildkit
container_name: metacall_builder_buildkit
restart: always
privileged: true
healthcheck:
test: buildctl debug workers
interval: 10s
timeout: 10s
retries: 6
start_period: 5s
registry:
image: registry:2.8
container_name: metacall_builder_registry
restart: always
ports:
- 5000:5000
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://registry:5000/v2/_catalog"]
interval: 10s
timeout: 10s
retries: 6
start_period: 10s
volumes:
- ./registry/config.yml:/etc/docker/registry/config.yml:ro
- ./registry/data:/var/lib/registry:rw