fix dockerfile
This commit is contained in:
parent
bbdd9b9abd
commit
7b18bd8967
@ -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
|
||||
|
||||
|
@ -109,6 +109,5 @@ async fn main() -> std::io::Result<()> {
|
||||
} else {
|
||||
server.bind(addr)?
|
||||
};
|
||||
println!("whoops");
|
||||
server.run().await
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user