This commit is contained in:
2024-02-02 13:31:36 +00:00
parent 38c48a8363
commit 89fd9b26a8
4 changed files with 37 additions and 0 deletions

15
simple-test/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# create dockerfile to run python script
# Use an official Python runtime as the base image
FROM ubuntu:20.04
# Set the working directory in the container
WORKDIR /app
RUN apt-get update && apt-get install -y ca-certificates
# Copy the requirements file to the working directory
COPY nak .
# start entrypoint.sh
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]

19
simple-test/README.md Normal file
View File

@@ -0,0 +1,19 @@
### prereqs
'''
git clone https://github.com/gramineproject/gsc.
apt install python3-pip
pip install docker
'''
### run
'''
./gsc build simple-nak test/generic.manifest
./gsc sign-image simple-nak /root/.config/gramine/enclave-key.pem
./gsc info-image gsc-simple-nak
docker run --device=/dev/sgx_enclave gsc-simple-nak
docker run --device=/dev/sgx_enclave --env GSC_PAL=Linux --security-opt seccomp=docker_seccomp_aug_2022.json gsc-simple-nak
'''

View File

@@ -0,0 +1,3 @@
#!/bin/bash
./nak key generate
./nak event --kind 1 --content "enclave test $(date )" wss://relay.nostr.net

BIN
simple-test/nak Executable file

Binary file not shown.