Skip to content

Commit 1dea275

Browse files
committed
docker: run aesm with root
Groups/permissions in container do not always match with host env. Run aesm with root to ensure access to /dev/sgx_provision Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>
1 parent 75375a3 commit 1dea275

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docker/build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN apt-get update && apt-get install -y \
7373
WORKDIR /installer
7474
COPY --from=builder /linux-sgx/linux/installer/bin/*.bin ./
7575
RUN ./sgx_linux_x64_psw*.bin --no-start-aesm
76-
USER aesmd
76+
# Run the aesm service as root to ensure its access to /dev/sgx/provision
7777
WORKDIR /opt/intel/sgxpsw/aesm/
7878
ENV LD_LIBRARY_PATH=.
7979
CMD ./aesm_service --no-daemon

linux/installer/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ RUN apt-get install -y \
7777
# More aesm plugins, e.g libsgx-aesm-quote-ex-plugin, are needed if application requires attestation. See installation guide.
7878
RUN apt-get install -y libsgx-aesm-launch-plugin
7979

80-
USER aesmd
80+
# Run the aesm service as root to ensure its access to /dev/sgx/provision
8181
WORKDIR /opt/intel/sgx-aesm-service/aesm
8282
ENV LD_LIBRARY_PATH=.
8383
CMD ./aesm_service --no-daemon

0 commit comments

Comments
 (0)