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