fixed-dcok
This commit is contained in:
parent
e30029afe8
commit
52a9d2df3a
18
Dockerfile
18
Dockerfile
|
@ -1,24 +1,32 @@
|
|||
FROM rustlang/rust:nightly-slim as build
|
||||
|
||||
WORKDIR /presense
|
||||
# had to add this for open-ssl
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y libssl-dev && \
|
||||
apt-get install -y git pkg-config make g++ libssl-dev wget && \
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
|
||||
RUN USER=root cargo new --bin presense
|
||||
WORKDIR /presense
|
||||
|
||||
COPY ./Cargo.lock ./Cargo.lock
|
||||
COPY ./Cargo.toml ./Cargo.toml
|
||||
|
||||
# cache dependencies
|
||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
RUN cargo build --release
|
||||
RUN rm src/*.rs
|
||||
|
||||
# copy your source tree
|
||||
COPY ./src ./src
|
||||
|
||||
# build for release
|
||||
RUN rm ./target/release/deps/presense*
|
||||
RUN cargo build --release
|
||||
|
||||
FROM rustlang/rust:nightly-slim
|
||||
|
||||
ENV RUST_BACKTRACE=full
|
||||
RUN apt-get update && apt install -y openssl
|
||||
COPY --from=build /notifier/target/release/presense .
|
||||
EXPOSE 8080
|
||||
RUN apt-get update && apt install -y openssl libssl-dev
|
||||
|
||||
COPY --from=build /chatcms/target/release/presense .
|
||||
CMD ["./presense"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user