Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Add image working on Azure SGX VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
grydz committed Jan 5, 2024
1 parent 57a1974 commit 4766a8d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/publish_azure_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: MSE base docker image BETA

on:
push:
branches:
- 'azure-dcap*'
env:
REGISTRY: ghcr.io

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
IMAGE: ghcr.io/cosmian/mse-base-azure-beta

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Packages
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |
${{ env.IMAGE }}:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .github/workflows/publish_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- main
- release
- develop
- azure-dcap
tags-ignore:
- "**"

Expand Down
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,18 @@ COPY --from=gramine-build /usr/local/bin/gramine-* /usr/local/bin/
COPY --from=gramine-build /usr/local/lib/python3.10/dist-packages/graminelibos /usr/local/lib/python3.10/dist-packages/graminelibos
COPY --from=gramine-build /usr/local/lib/x86_64-linux-gnu/gramine/ /usr/local/lib/x86_64-linux-gnu/gramine/

# Ubuntu focal-security repository
RUN echo "deb http://security.ubuntu.com/ubuntu focal-security main" | tee /etc/apt/sources.list.d/focal-security.list

# Intel SGX APT repository
RUN curl -fsSLo /usr/share/keyrings/intel-sgx-deb.asc https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx-deb.asc] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" \
| tee /etc/apt/sources.list.d/intel-sgx.list

# Microsoft APT repository
RUN echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/20.04/prod focal main" >> /etc/apt/sources.list.d/microsoft.list \
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

# Install Intel SGX dependencies and Gramine
RUN apt-get update && apt-get install -y \
libsgx-launch \
Expand All @@ -103,7 +110,8 @@ RUN apt-get update && apt-get install -y \
libsgx-dcap-ql \
libsgx-dcap-quote-verify \
linux-base-sgx \
libsgx-dcap-default-qpl \
libssl1.1 \
az-dcap-client \
sgx-aesm-service \
libsgx-aesm-quote-ex-plugin && \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 4766a8d

Please sign in to comment.