dockerfile

This commit is contained in:
Robin Appelman 2020-06-20 13:06:53 +02:00
commit 5778c6164b
3 changed files with 18 additions and 0 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
target
.git

View file

@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Robin Appelman <robin@icewind.nl>"] authors = ["Robin Appelman <robin@icewind.nl>"]
edition = "2018" edition = "2018"
[[bin]]
name = "log-normalizer"
path = "src/main.rs"
[dependencies] [dependencies]
sqlx = { version = "0.3", default_features = false, features = ["macros", "postgres", "json", "runtime-tokio", "chrono"] } sqlx = { version = "0.3", default_features = false, features = ["macros", "postgres", "json", "runtime-tokio", "chrono"] }
dotenv = "0.15.0" dotenv = "0.15.0"

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM ekidd/rust-musl-builder AS build
ADD . ./
RUN sudo chown -R rust:rust .
RUN cargo build --release
FROM alpine:latest
COPY --from=build /home/rust/src/target/x86_64-unknown-linux-musl/release/log-normalizer /
CMD ["/log-normalizer"]