Unverified Commit 87a6a0bc authored by Sergiy Lavrynenko's avatar Sergiy Lavrynenko

SKALE-1850 build improvements

parents 47b9421c 8bee9b40
sudo: required
services:
- docker
branches:
only:
- develop
install:
- docker build -t sgxwallet docker
script:
......@@ -54,14 +54,6 @@ cd scripts; sudo ./sgx_linux_x64_sdk_2.5.100.49891.bin; cd ..
cd scripts; sudo ./install_packages.sh; cd ..
```
## Install automake 1.15
Currently the build builds with **automake 1.15**. You need to install it since Ubuntu 18 comes with **automake 1.16** by default.
```
cd scripts; sudo dpkg -i automake_1.15.1-3ubuntu2_all.deb; cd ..
```
## Build dependencies
Dependencies only need to be built once.
......@@ -102,6 +94,40 @@ Type:
`./sgxwallet`
```
## Build Docker container
```
sudo apt-get install -y docker.io;
cd docker;
sudo docker build -t sgxcontainer .
```
## Run Docker container
Enable SGX and install SGX driver on the host machine as described above.
Then run
```
sudo docker run -di --network host --device /dev/isgx --device /dev/mei0 --name sgxwallet sgxcontainer ./start.sh
```
This will run the server in a Docker container named sgxwallet
You can check that the server is running by doing
```
telnet localhost 2027
```
You can start and stop running sgxwallet container by doing
```
docker stop sgxwallet
docker start sgxwallet
```
## Development
Note that `configure, Makefile` and `Makefile.in` files are created by `automake` tools on the fly.
......
......@@ -37,3 +37,4 @@ RUN autoconf
RUN ./configure
### RUN cd libBLS; cmake -H. -Bbuild; cmake --build build -- -j$(nproc);
RUN make
COPY start.sh ./
......@@ -6,5 +6,6 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/intel/sgxpsw/aesm/
/opt/intel/sgxpsw/aesm/aesm_service &
pid=$!
sgxwallet
sleep 2
/usr/src/sdk/sgxwallet/sgxwallet
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment