From 92fb283bcd585753cd13e68aecd6459803fbbbd0 Mon Sep 17 00:00:00 2001 From: Ian Goldberg Date: Wed, 17 Aug 2022 10:20:12 -0400 Subject: [PATCH] Touch up the docker environment --- crates/lox-library/Dockerfile | 6 ++---- crates/lox-library/README.md | 7 +++++++ crates/lox-library/build-lox.sh | 1 - crates/lox-library/run-lox.sh | 2 +- crates/lox-library/stop-lox.sh | 2 -- 5 files changed, 10 insertions(+), 8 deletions(-) delete mode 100755 crates/lox-library/stop-lox.sh 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