From 3dde20d845e32ef16d8b9c4c9621c58605483cf3 Mon Sep 17 00:00:00 2001 From: onyinyang Date: Sun, 14 Aug 2022 20:31:09 -0400 Subject: [PATCH] Added Dockerfile and build scripts for PETS2023 --- crates/lox-library/Dockerfile | 10 ++++++++++ crates/lox-library/build-lox.sh | 3 +++ crates/lox-library/run-lox.sh | 2 ++ crates/lox-library/stop-lox.sh | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 crates/lox-library/Dockerfile create mode 100755 crates/lox-library/build-lox.sh create mode 100755 crates/lox-library/run-lox.sh create mode 100755 crates/lox-library/stop-lox.sh diff --git a/crates/lox-library/Dockerfile b/crates/lox-library/Dockerfile new file mode 100644 index 0000000..fab6196 --- /dev/null +++ b/crates/lox-library/Dockerfile @@ -0,0 +1,10 @@ +FROM rust:1.56.0 +WORKDIR /home/lox +ADD src/ ./src/ +ADD Cargo.toml Cargo.toml +ADD tests/ ./tests/tests +ADD README.md README.md +RUN cargo build +ENV SHELL=/bin/bash + + diff --git a/crates/lox-library/build-lox.sh b/crates/lox-library/build-lox.sh new file mode 100755 index 0000000..c640c26 --- /dev/null +++ b/crates/lox-library/build-lox.sh @@ -0,0 +1,3 @@ +#!/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 new file mode 100755 index 0000000..67c7e9b --- /dev/null +++ b/crates/lox-library/run-lox.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run -it lox /bin/bash diff --git a/crates/lox-library/stop-lox.sh b/crates/lox-library/stop-lox.sh new file mode 100755 index 0000000..1383113 --- /dev/null +++ b/crates/lox-library/stop-lox.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker stop lox