/phala-pruntime-docker

Docker container used to compile and deploy phala pRuntime

Primary LanguageShell

Phala pRuntime Docker

Used to compile and deploy Phala pRuntime

Compile docker from Dockerfile

docker build -t <name:tag> .

Or download precompiled docker image

docker pull tolak/phala-pruntime-docker

Run docker container

docker run \
    -it -p 8000:8000 \
    -v <phala-blochain source code dir>:/root/phala-blockchain \
    --name pruntime tolak/phala-pruntime-docker

Compile & run

  • compile pRuntime

enter docker container

docker attach <container id>

execute within container, run SGX_MODE=SW make for simulation mode if you don't have the hardware

cd /root/phala-blockchain/
git submodule init
git submodule update
cd pruntime
SGX_MODE=SW make

Make sure put spid.txt (linkable) and key.txt into bin/.

  • run pruntime

execute target file

cd bin
./app

Intel SGX Driver and SDK are needed. Set environment variable SGX_MODE=SW while building to run it in computer without SGX.

The dev mode keys in spid.txt and key.txt can be obtainied from Intel.