diff options
author | Orhun Parmaksız <orhunparmaksiz@gmail.com> | 2022-09-29 23:11:44 +0200 |
---|---|---|
committer | Orhun Parmaksız <orhunparmaksiz@gmail.com> | 2022-09-29 23:11:44 +0200 |
commit | ecca5b78115290234a8432ffa376820bef764eab (patch) | |
tree | 1c47a86ae3f46332175fe5d2f08465aaa8a4eea2 | |
parent | 327ca7c52b348870dd61e2181d7e50f3b5502790 (diff) |
chore: Update Rust version and dependencies in Dockerfile
-rw-r--r-- | Dockerfile | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1,26 +1,27 @@ # Builder -FROM rust:1.56-slim-buster as builder -RUN apt-get update && apt-get install -y --no-install-recommends \ - libxcb1-dev=1.13.1-2 libxcb-shape0-dev=1.13.1-2 libxcb-xfixes0-dev=1.13.1-2 \ - python3 --allow-unauthenticated \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +FROM rust:1.63-slim-buster as builder +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + --allow-unauthenticated \ + libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app/ COPY Cargo.toml Cargo.toml RUN mkdir src/ && echo "fn main() {println!(\"failed to build\")}" > src/main.rs -RUN cargo build --release +RUN cargo build --release --verbose RUN rm -f target/release/deps/kmon* COPY . . -RUN cargo build --release +RUN cargo build --locked --release --verbose RUN mkdir -p build-out && cp target/release/kmon build-out/ # Runtime FROM debian:buster-slim as runtime-image -RUN apt-get update && apt-get install -y --no-install-recommends \ - libxcb1-dev=1.13.1-2 libxcb-shape0-dev=1.13.1-2 libxcb-xfixes0-dev=1.13.1-2 \ - kmod=26-1 --allow-unauthenticated \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + --allow-unauthenticated \ + kmod \ + libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \ + && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /root/ COPY --from=builder /app/build-out/kmon . CMD ["./kmon"] |