Explorar o código

Added Dockerfile and build scripts for PETS2023

onyinyang %!s(int64=2) %!d(string=hai) anos
pai
achega
1e30e0ccdd
Modificáronse 4 ficheiros con 17 adicións e 0 borrados
  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