Started Dockerfile

pull/8/head
Jef Roosens 2021-06-19 11:54:46 +02:00
parent 9f004d1eb7
commit 6e19ac5a63
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
4 changed files with 68 additions and 1 deletions

5
.dockerignore 100644
View File

@ -0,0 +1,5 @@
*
!Cargo.toml
!Cargo.lock
!src/

45
Cargo.lock generated
View File

@ -84,6 +84,12 @@ version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
version = "1.0.1"
@ -170,6 +176,29 @@ dependencies = [
"syn",
]
[[package]]
name = "diesel"
version = "1.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bba51ca66f57261fd17cadf8b73e4775cc307d0521d855de3f5de91a8f074e0e"
dependencies = [
"bitflags",
"byteorder",
"diesel_derives",
"pq-sys",
]
[[package]]
name = "diesel_derives"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "discard"
version = "1.0.4"
@ -373,6 +402,7 @@ dependencies = [
name = "hilde"
version = "0.1.0"
dependencies = [
"diesel",
"rocket",
]
@ -661,6 +691,15 @@ version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
[[package]]
name = "pq-sys"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda"
dependencies = [
"vcpkg",
]
[[package]]
name = "proc-macro-hack"
version = "0.5.19"
@ -1262,6 +1301,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
[[package]]
name = "vcpkg"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70455df2fdf4e9bf580a92e443f1eb0303c390d682e2ea817312c9e81f8c3399"
[[package]]
name = "version_check"
version = "0.9.3"

View File

@ -1,10 +1,11 @@
[package]
name = "hilde"
version = "0.1.0"
authors = ["jjr <roosensjef@gmail.com>"]
authors = ["Jef Roosens <roosensjef@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = "0.5.0-rc.1"
diesel = { version = "1.4.7", features = ["postgres"] }

16
Dockerfile 100644
View File

@ -0,0 +1,16 @@
FROM rust:1.52-alpine3.13 AS builder
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY src ./src/
RUN cargo build \
--release
FROM alpine:3.13
COPY --from=builder /src/target/release/hilde /usr/local/bin/hilde
ENTRYPOINT [ "/usr/local/bin/hilde" ]