Skip to content

Commit 7e61432

Browse files
authored
fix: add cgroup&mountinfo for docker env (#383)
* fix: add cgroup&mountinfo for docker env * fix: all mount info comes from /sys/fs/cgroup/ * feat(sgx): update sgx-guest.docker.manifest.template Add mount info for /proc/self/mountinfo and /proc/self/cgroup, and /sys/fs/cgroup/ to the allowed files in the sgx-guest.docker.manifest.template file. Also, increase the maximum threads to 512.
1 parent f33d211 commit 7e61432

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WORKDIR /opt/raiko
1212
COPY . .
1313
RUN cargo build --release ${BUILD_FLAGS} --features "sgx" --features "docker_build"
1414

15-
FROM gramineproject/gramine:1.6-jammy AS runtime
15+
FROM gramineproject/gramine:1.7-jammy AS runtime
1616
ENV DEBIAN_FRONTEND=noninteractive
1717
WORKDIR /opt/raiko
1818

provers/sgx/config/sgx-guest.docker.manifest.template

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ fs.mounts = [
1818
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
1919
{ path = "/usr/lib/ssl/certs/", uri = "file:/usr/lib/ssl/certs/" },
2020
{ path = "/root/.config/raiko/config", uri = "file:/root/.config/raiko/config" },
21+
{ path = "/proc/self/mountinfo", uri = "file:/proc/self/mountinfo" },
22+
{ path = "/proc/self/cgroup", uri = "file:/proc/self/cgroup" },
23+
{ path = "/sys/fs/cgroup/", uri = "file:/sys/fs/cgroup/" },
2124
{ path = "/root/.config/raiko/secrets", uri = "file:/root/.config/raiko/secrets", type = "encrypted", key_name = "_sgx_mrenclave" },
2225
]
2326
sgx.allowed_files = [
2427
"file:/root/.config/raiko/config",
28+
"file:/proc/self/mountinfo",
29+
"file:/proc/self/cgroup",
30+
"file:/sys/fs/cgroup/",
2531
]
2632
sgx.debug = false
2733
sgx.edmm_enable = {{ 'true' if env.get('EDMM', '1') == '1' else 'false' }}
@@ -34,7 +40,7 @@ sgx.trusted_files = [
3440
"file:/usr/lib/ssl/certs/",
3541
"file:sgx-guest",
3642
]
37-
sgx.max_threads = 32
43+
sgx.max_threads = 512
3844
sgx.remote_attestation = "dcap"
3945
sys.enable_extra_runtime_domain_names_conf = true
4046
sys.insecure__allow_eventfd = true

0 commit comments

Comments
 (0)