-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
40 lines (36 loc) · 1.71 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
40 lines (36 loc) · 1.71 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
name: tsm-shim-example
# Run an UNMODIFIED configfs-tsm attestation binary on a stock dstack CVM.
#
# `tsm-shim` is a prebuilt sidecar (built & published to GHCR by
# .github/workflows/build-tsm-shim.yml) that re-exposes the dstack guest-agent's
# GetQuote RPC under the standard configfs-tsm file ABI (inblob/outblob). Your
# app talks to the kernel-style interface it already expects; the shim forwards
# report_data to real TDX hardware and returns the genuine quote. No OS change,
# no FUSE, no privileged container, no extra capabilities.
#
# The `app` service below is a self-test (it reuses the shim image only to run a
# bundled demo client). In your own deployment, replace `app` with your service
# and add the four lines marked (+).
services:
# ---------- the shim sidecar ----------
tsm-shim:
image: ghcr.io/dstack-tee/dstack-tsm-shim:latest
restart: unless-stopped
volumes:
- /var/run/dstack.sock:/var/run/dstack.sock # source of real quotes
- tsm-report:/run/tsm/report # FIFOs shared with the app
# ---------- your app (here: a bundled demo client) ----------
app:
image: ghcr.io/dstack-tee/dstack-tsm-shim:latest # <- replace with your image
entrypoint: ["python3", "/usr/local/bin/demo-app.py"] # <- your app's entrypoint
depends_on:
tsm-shim:
condition: service_healthy # (+) wait until FIFOs exist
environment:
- TSM_REPORT_PATH=/run/tsm/report # (+) point the app at the shim
volumes:
- tsm-report:/run/tsm/report # (+) see the shim's FIFOs
- tsm-devstub:/dev/tdx-guest # (+) make /dev/tdx-guest "exist"
volumes:
tsm-report: {}
tsm-devstub: {}