Skip to content

Commit

Permalink
chore: Update Dockerfile about dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Dec 14, 2020
1 parent 1f73fd7 commit 56d0a3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update kmon.8 to include string "kmod" ([#24](https://github.com/orhun/kmon/issues/24))
- Update Cargo.toml about project details
- Update Dockerfile about image and dependency versions

### Removed
- Remove snapcraft.yaml
Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Build Image
FROM rust:1.48-slim-buster as cargo-build
RUN apt-get update && apt-get install -y --no-install-recommends \
libxcb-shape0-dev=1.12-1 libxcb-xfixes0-dev=1.12-1 --allow-unauthenticated \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
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/*
WORKDIR /app/
COPY Cargo.toml Cargo.toml
RUN mkdir src/ && echo "fn main() {println!(\"failed to build\")}" > src/main.rs
Expand All @@ -16,9 +17,10 @@ RUN mkdir -p build-out && cp target/release/kmon build-out/
# Runtime Image
FROM debian:buster-slim as runtime-image
RUN apt-get update && apt-get install -y --no-install-recommends \
libxcb-shape0-dev=1.12-1 libxcb-xfixes0-dev=1.12-1 kmod=23-2 --allow-unauthenticated \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
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/*
WORKDIR /root/
COPY --from=cargo-build /app/build-out/kmon .
CMD ["./kmon"]

0 comments on commit 56d0a3b

Please sign in to comment.