diff --git a/crates/lox-library/Dockerfile b/crates/lox-library/Dockerfile index fab6196..1c12288 100644 --- a/crates/lox-library/Dockerfile +++ b/crates/lox-library/Dockerfile @@ -2,9 +2,7 @@ FROM rust:1.56.0 WORKDIR /home/lox ADD src/ ./src/ ADD Cargo.toml Cargo.toml -ADD tests/ ./tests/tests +ADD tests/ ./tests/ ADD README.md README.md -RUN cargo build +RUN cargo build --release ENV SHELL=/bin/bash - - diff --git a/crates/lox-library/README.md b/crates/lox-library/README.md index c5aad0b..a4e08f3 100644 --- a/crates/lox-library/README.md +++ b/crates/lox-library/README.md @@ -3,6 +3,13 @@ Lox is a reputation-based bridge distribution system that provides privacy protection to users and their social graph and is open to all users. Lox is written in rust and requires `cargo` to test. [Install Rust](https://www.rust-lang.org/tools/install) +### To use the docker environment to build the package: + +``` +./build-lox.sh +./run-lox.sh +``` + ### To run the tests used for our experimental results run: ``` diff --git a/crates/lox-library/build-lox.sh b/crates/lox-library/build-lox.sh index c640c26..141dda5 100755 --- a/crates/lox-library/build-lox.sh +++ b/crates/lox-library/build-lox.sh @@ -1,3 +1,2 @@ #!/bin/bash -docker rm lox 2>&1; docker build -t lox . diff --git a/crates/lox-library/run-lox.sh b/crates/lox-library/run-lox.sh index 19ca983..e95657d 100755 --- a/crates/lox-library/run-lox.sh +++ b/crates/lox-library/run-lox.sh @@ -1,2 +1,2 @@ #!/bin/bash -docker run --name lox -it lox:latest /bin/bash +docker run --name lox --rm -it lox:latest /bin/bash diff --git a/crates/lox-library/stop-lox.sh b/crates/lox-library/stop-lox.sh deleted file mode 100755 index 1383113..0000000 --- a/crates/lox-library/stop-lox.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -docker stop lox