docker
This commit is contained in:
parent
c67fcc6fa3
commit
7f60f8fd3d
3 changed files with 18 additions and 1 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
Dockerfile
|
|
@ -13,8 +13,9 @@ async-sqlx-session = "0.2"
|
||||||
async-std = { version = "1.6", features = ["attributes"] }
|
async-std = { version = "1.6", features = ["attributes"] }
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
http-types = "2.4"
|
http-types = "2.4"
|
||||||
|
openssl = { version = "0.10.30", features = ["vendored"] }
|
||||||
serde = "1.0"
|
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"
|
tide = "0.13"
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
|
|
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue