浏览代码

Added Dockerfile and build scripts for PETS2023

onyinyang 2 年之前
父节点
当前提交
1e30e0ccdd
共有 4 个文件被更改,包括 17 次插入0 次删除
  1. 10 0
      Dockerfile
  2. 3 0
      build-lox.sh
  3. 2 0
      run-lox.sh
  4. 2 0
      stop-lox.sh

+ 10 - 0
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
+
+

+ 3 - 0
build-lox.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+docker rm lox 2>&1;
+docker build -t lox .

+ 2 - 0
run-lox.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+docker run -it lox /bin/bash

+ 2 - 0
stop-lox.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+docker stop lox