Added a Dockerfile for building
This commit is contained in:
parent
71e51adb4c
commit
4932bb57ad
2 changed files with 17 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
16
Dockerfile
Normal 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"]
|
Loading…
Reference in a new issue