Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/redthing1/openenclave-dev-docker
docker image for openenclave development
https://github.com/redthing1/openenclave-dev-docker
Last synced: 5 days ago
JSON representation
docker image for openenclave development
- Host: GitHub
- URL: https://github.com/redthing1/openenclave-dev-docker
- Owner: redthing1
- Created: 2024-03-18T20:54:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-20T20:44:17.000Z (10 months ago)
- Last Synced: 2024-11-08T08:27:25.485Z (about 2 months ago)
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openenclave-dev-docker
docker image for openenclave development
+ based on the [offiical openenclave base image](https://github.com/openenclave/openenclave/blob/45280ac3134cfa8f74eb2fe9c911ec0dc2727dbb/.jenkins/infrastructure/docker/dockerfiles/linux/base/README.md)
+ builds the sdk within the container
+ can build openenclave projects to binaries
+ does not require working sgx, only simulation mode# usage
## build
build the container image:
```sh
docker build --pull -t openenclave-dev -f ./openenclave-dev.docker .
```## run container
run a container:
+ for running in **sgx hardware**, add `--device `, with the correct device as described in [openenclave docker documentation](https://github.com/openenclave/openenclave/blob/master/docs/GettingStartedDocs/Contributors/BuildingInADockerContainer.md).
+ for running in **simulation mode**, no special device is necessaryrun a container (sgx hardware support)
```sh
sudo docker run --device --rm -it openenclave-dev
```run a container (sgx simulation support)
```sh
docker run --rm -it openenclave-dev
```## run enclave program
demonstrate that it works:
```sh
# source openenclave paths (pkg-config, etc.)
. /opt/openenclave/share/openenclave/openenclaverc
# go to helloworld sample and build
cd ~/openenclave/samples/helloworld
make -j
# run the helloworld sample in sgx simulation mode
./host/helloworld_host ./enclave/enclave.signed --simulate
```to run the demo directly in this repo:
```sh
# mount this dir into the container
docker run --rm -it -v $(pwd):/prj openenclave-dev
# inside the container:
cd /prj/demo/helloworld
. /opt/openenclave/share/openenclave/openenclaverc
make -j
# run the helloworld sample in sgx simulation mode
./host/helloworld_host ./enclave/enclave.signed --simulate
```# release
export the built container image:
```sh
docker save openenclave-dev | zstd --compress -T0 --long -16 > /path/to/openenclave-dev.tar.zst
```load the built container image:
```sh
zstd -c -d /path/to/openenclave-dev.tar.zst | docker load
```