Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 2.34 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
services:
gateway:
build: .
image: sealed/gateway:0.0.1
ports: ["127.0.0.1:8470:8470"]
networks: [default, internal] # default: reachable on localhost; internal: reaches the launcher
volumes:
- ${HOME}/.sealed:${HOME}/.sealed # allowlist (read), audit log (write). NO docker socket here.
environment:
SEALED_HOME: ${HOME}/.sealed
SEALED_LAUNCHER: http://launcher:8473
SEALED_ALLOW_NO_KEYS: "1" # the port is published on 127.0.0.1 only; create keys (`sealed keys create`) before exposing it
SEALED_ALLOW_NO_TLS: "1" # same reason; for a network-facing gateway mount a cert and set SEALED_TLS_CERT / SEALED_TLS_KEY
depends_on: [launcher]
user: "${SEALED_UID:-1000}:${SEALED_GID:-1000}" # owner of ~/.sealed, so the audit log stays writable with all caps dropped
read_only: true
tmpfs: [/tmp]
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
restart: unless-stopped
launcher:
image: sealed/gateway:0.0.1
command: ["sealed", "launcher", "--host", "0.0.0.0"]
networks: [internal] # not published; only the gateway can reach it
volumes:
- /var/run/docker.sock:/var/run/docker.sock # the ONE place the socket is mounted
- ${HOME}/.sealed:${HOME}/.sealed:ro # allowlist is the only input it trusts
environment:
SEALED_HOME: ${HOME}/.sealed
SEALED_GPU: "0"
SEALED_RUNTIME: "" # set to runsc once gVisor is installed on the host
restart: unless-stopped
agent: # only with --profile managed (after `sealed enroll`)
image: sealed/gateway:0.0.1
profiles: [managed]
command: ["sealed", "agent"]
networks: [default, internal] # default: reaches the control plane; internal: reads launcher pool status
volumes:
- ${HOME}/.sealed:${HOME}/.sealed # agent.json, audit offset, pushed policies/trust
environment:
SEALED_HOME: ${HOME}/.sealed
SEALED_LAUNCHER: http://launcher:8473
user: "${SEALED_UID:-1000}:${SEALED_GID:-1000}"
depends_on: [launcher]
restart: unless-stopped
networks:
internal:
internal: true # no route to the outside for either service