Browse Source

fix dockerfile

devel
Rohan Sircar 3 years ago
parent
commit
7b18bd8967
  1. 8
      Dockerfile
  2. 1
      src/main.rs

8
Dockerfile

@ -3,19 +3,17 @@ FROM rust:1.51 as builder
# ENV CARGO_HOME=/actix-demo/.cargo
RUN USER=root cargo new --bin actix-demo
WORKDIR /actix-demo
# COPY ./.cargo ./.cargo
COPY ./Cargo.toml ./Cargo.toml
COPY ./Cargo.lock ./Cargo.lock
RUN cargo build --release
RUN rm src/*.rs
RUN rm -r src/*.rs
COPY ./src ./src
#RUN rm ./target/release/deps/actix-demo*
RUN rm ./target/release/deps/actix_demo*
RUN cargo build --release
FROM debian:buster-slim
ARG APP=/usr/src/app

1
src/main.rs

@ -109,6 +109,5 @@ async fn main() -> std::io::Result<()> {
} else {
server.bind(addr)?
};
println!("whoops");
server.run().await
}
Loading…
Cancel
Save