From 91f7276f69444885a0f6cb6f845c4ccbe232d209 Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Tue, 19 Nov 2024 23:04:32 -0500 Subject: [PATCH] feat: add nginx example --- .github/workflows/release.yml | 12 +++++++++++- example/Dockerfile | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 example/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4496b0a..76b6151 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,16 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Build nginx-nitro image + uses: docker/build-push-action@v5 + with: + context: example + push: false + load: true + tags: nginx-nitro:latest + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Build eif-builder image uses: docker/build-push-action@v5 with: @@ -37,7 +47,7 @@ jobs: --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(pwd):/output \ - -e DOCKER_IMAGE=hello-world:latest \ + -e DOCKER_IMAGE=nginx-nitro:latest \ -e EIF_FILE=tinfoil-helper-enclave-${{ github.ref_name }}.eif \ -e INFO_FILE=tinfoil-helper-enclave-${{ github.ref_name }}-info.json \ eif-builder:latest diff --git a/example/Dockerfile b/example/Dockerfile new file mode 100644 index 0000000..8fce967 --- /dev/null +++ b/example/Dockerfile @@ -0,0 +1,9 @@ +FROM ghcr.io/tinfoilanalytics/nitro-attestation-shim AS shim +FROM nginxdemos/hello + +COPY --from=shim /nitro-attestation-shim /nitro-attestation-shim + +ENV NITRO_SHIM_PORT=6000 +ENV NITRO_SHIM_UPSTREAM_PORT=80 + +ENTRYPOINT ["/nitro-attestation-shim", "nginx", "-g", "daemon off;"]