diff --git a/simple-test/Dockerfile b/simple-test/Dockerfile new file mode 100644 index 0000000..58b3609 --- /dev/null +++ b/simple-test/Dockerfile @@ -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"] \ No newline at end of file diff --git a/simple-test/README.md b/simple-test/README.md new file mode 100644 index 0000000..45599ce --- /dev/null +++ b/simple-test/README.md @@ -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 + +''' \ No newline at end of file diff --git a/simple-test/entrypoint.sh b/simple-test/entrypoint.sh new file mode 100644 index 0000000..2cdf81a --- /dev/null +++ b/simple-test/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash +./nak key generate +./nak event --kind 1 --content "enclave test $(date )" wss://relay.nostr.net \ No newline at end of file diff --git a/simple-test/nak b/simple-test/nak new file mode 100755 index 0000000..c12769d Binary files /dev/null and b/simple-test/nak differ