Added a Dockerfile for building

This commit is contained in:
Maddox Werts 2024-06-19 15:33:46 -04:00
parent 71e51adb4c
commit 4932bb57ad
2 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
# will have compiled files and executables # will have compiled files and executables
debug/ debug/
target/ target/
build/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # 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 # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

16
Dockerfile Normal file
View file

@ -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"]