-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #655 from fortanix/ns/RTE-108
Dockerfile for PPID retrieval tool
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This workflow is used to build docker image for ppid-retrieval-tool | ||
|
||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
paths: | ||
- "intel-sgx/ppid-retrieval-tool/**" | ||
- ".github/workflows/**" | ||
pull_request: | ||
branches: ["master"] | ||
paths: | ||
- "intel-sgx/ppid-retrieval-tool/**" | ||
- ".github/workflows/**" | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
run: | | ||
cd intel-sgx/ppid-retrieval-tool | ||
docker build -t ppid-retrieval-tool:$(date +%s) . | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM ubuntu:24.04 AS sgx_sdk | ||
|
||
# Install user | ||
RUN useradd -rm -d /home/ppid-tool -s /bin/bash -g root -G sudo -u 1010 ppid-tool | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN echo 'ppid-tool:ppid-tool' | chpasswd | ||
USER ppid-tool | ||
WORKDIR /home/ppid-tool | ||
|
||
# Install SGX Dev tools | ||
USER root | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \ | ||
gnupg \ | ||
wget \ | ||
sudo | ||
|
||
# App build time dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y build-essential | ||
|
||
WORKDIR /opt/intel | ||
RUN wget https://download.01.org/intel-sgx/sgx-linux/2.25/distro/ubuntu24.04-server/sgx_linux_x64_sdk_2.25.100.3.bin | ||
RUN chmod +x sgx_linux_x64_sdk_2.25.100.3.bin | ||
RUN echo 'yes' | ./sgx_linux_x64_sdk_2.25.100.3.bin | ||
|
||
# Install SGX runtime libraries | ||
USER root | ||
RUN echo 'deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu noble main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list | ||
RUN wget https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | ||
RUN cat intel-sgx-deb.key | sudo tee /etc/apt/keyrings/intel-sgx-keyring.asc > /dev/null | ||
RUN apt-get update | ||
RUN apt-get install -y libsgx-urts | ||
|
||
# Preparing to build PCKIDRetrievalTool | ||
FROM sgx_sdk | ||
USER root | ||
|
||
WORKDIR ppid-tool | ||
COPY Enclave Enclave | ||
COPY pce pce | ||
COPY main.c main.c | ||
COPY Makefile Makefile | ||
|
||
RUN source /opt/intel/sgxsdk/environment && make | ||
|
||
ENTRYPOINT bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters