From 4932bb57ad7f6715822b077889eac49b319f6d5d Mon Sep 17 00:00:00 2001 From: OBJNULL Date: Wed, 19 Jun 2024 15:33:46 -0400 Subject: [PATCH] Added a Dockerfile for building --- .gitignore | 1 + Dockerfile | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index f2700a5..9cb12a2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # will have compiled files and executables debug/ target/ +build/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fb438da --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +## - INIT -- ## +# Prereqs +FROM rust + +# Setting up the directories +WORKDIR /src +RUN mkdir /build + +# Copying the project into it +COPY src/ ./src +COPY Cargo.toml . + +## - RUNTIME - ## + +# Building the app +CMD ["/bin/bash", "-c", "cargo build && cp ./target/debug/RustyPass /build/RustyPass"] \ No newline at end of file