This commit is contained in:
Stefan Schwarz 2020-08-21 23:43:42 +02:00
parent c67fcc6fa3
commit 7f60f8fd3d
3 changed files with 18 additions and 1 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
/target
Dockerfile

View file

@ -13,8 +13,9 @@ async-sqlx-session = "0.2"
async-std = { version = "1.6", features = ["attributes"] }
chrono = "0.4"
http-types = "2.4"
openssl = { version = "0.10.30", features = ["vendored"] }
serde = "1.0"
sqlx = { version = "0.4.0-beta.1", features = ["mysql", "chrono", "macros"] }
sqlx = { version = "0.4.0-beta.1", features = ["mysql", "chrono"] }
tide = "0.13"
[patch.crates-io]

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM rust as builder
WORKDIR /app
ADD . .
RUN apt update && apt install -y musl-tools
RUN rustup target add x86_64-unknown-linux-musl
RUN cargo build --release --target x86_64-unknown-linux-musl
RUN strip /app/target/release/macnickenson
# ---
FROM debian:buster-slim
COPY --from=builder /app/target/release/macnickenson /opt/macnickenson
CMD /opt/macnickenson