Skip to content

Commit

Permalink
Changed Docker image and introduced workaround from emk/rust-musl-bui…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahelhindi committed Mar 27, 2020
1 parent 5599828 commit 8d63c0f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
55 changes: 55 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ r2d2 = "0.8"
tokio = { version = "0.2", features = ["macros"] }
tonic = "0.1"
uuid = { version = "0.8", features = ["serde", "v4"] }
openssl = "*"

[build-dependencies]
tonic-build = { version = "0.1.1", default-features = false, features = ["transport"] }
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM clux/muslrust:1.42.0-stable as cargo-build
FROM ekidd/rust-musl-builder:1.42.0 as cargo-build

COPY . .

RUN cargo install --path .

FROM alpine:latest

COPY --from=cargo-build /root/.cargo/bin/lieferemma /usr/local/bin/lieferemma


COPY --from=cargo-build /home/rust/.cargo/bin/lieferemma /usr/local/bin/lieferemma

ENV RUST_LOG=info

Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extern crate openssl;
#[macro_use]
extern crate diesel;

Expand All @@ -17,6 +18,7 @@ use tonic::transport::Server;

#[tokio::main]
async fn main() -> Result<()> {

let opt = Opt::from_args();

let pg_connection_manager = ConnectionManager::new(opt.database_url());
Expand Down

0 comments on commit 8d63c0f

Please sign in to comment.