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
|
# ENV CARGO_HOME=/actix-demo/.cargo
|
||||||
RUN USER=root cargo new --bin actix-demo
|
RUN USER=root cargo new --bin actix-demo
|
||||||
WORKDIR /actix-demo
|
WORKDIR /actix-demo
|
||||||
|
|
||||||
# COPY ./.cargo ./.cargo
|
# COPY ./.cargo ./.cargo
|
||||||
COPY ./Cargo.toml ./Cargo.toml
|
COPY ./Cargo.toml ./Cargo.toml
|
||||||
COPY ./Cargo.lock ./Cargo.lock
|
COPY ./Cargo.lock ./Cargo.lock
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
RUN rm src/*.rs
|
RUN rm -r src/*.rs
|
||||||
|
|
||||||
COPY ./src ./src
|
COPY ./src ./src
|
||||||
|
RUN rm ./target/release/deps/actix_demo*
|
||||||
#RUN rm ./target/release/deps/actix-demo*
|
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
ARG APP=/usr/src/app
|
ARG APP=/usr/src/app
|
||||||
|
|
||||||
|
@ -109,6 +109,5 @@ async fn main() -> std::io::Result<()> {
|
|||||||
} else {
|
} else {
|
||||||
server.bind(addr)?
|
server.bind(addr)?
|
||||||
};
|
};
|
||||||
println!("whoops");
|
|
||||||
server.run().await
|
server.run().await
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user