Skip to content

Commit

Permalink
Switched base system to debian:12.7-slim + included the rustfmt c…
Browse files Browse the repository at this point in the history
…omponent.
  • Loading branch information
danieltrick committed Sep 10, 2024
1 parent 1ecf8ae commit 4cef61b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/).

## r6 - 2024-09-10

### Added
- Included the `rustfmt` component with the Rust installation.

### Changed
- Switched base system from `bitnami/minideb:bookworm` to `debian:12.7-slim`.

## r5 - 2024-09-05

### Changed
Expand Down
33 changes: 20 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Debian Version
ARG DEBIAN_VERS=bitnami/minideb:bookworm
ARG DEBIAN_VERS=debian:12.7-slim

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Stage #1
Expand All @@ -9,18 +9,23 @@ FROM $DEBIAN_VERS AS build
# Rust version
ARG RUST_VERSION=1.81.0

# Set up environment
ENV DEBIAN_FRONTEND=noninteractive
ENV CARGO_HOME=/opt/rust/cargo
ENV RUSTUP_HOME=/opt/rust/rustup

# Install build dependencies
RUN install_packages \
ca-certificates \
curl \
rdfind
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
rdfind \
&& rm -r /var/lib/apt/lists /var/cache/apt/archives

# Install Rust
RUN curl https://sh.rustup.rs -sSf | \
CARGO_HOME=/opt/rust/cargo RUSTUP_HOME=/opt/rust/rustup \
sh -s -- --default-toolchain=${RUST_VERSION} --profile=minimal -y \
sh -s -- --default-toolchain=${RUST_VERSION} --profile=minimal -y \
&& ${CARGO_HOME}/bin/rustup component add rustfmt \
&& rdfind -makeresultsfile false -makesymlinks true /opt/rust/

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -31,12 +36,14 @@ FROM $DEBIAN_VERS
ENV DEBIAN_FRONTEND=noninteractive

# Install runtime dependencies
RUN install_packages \
ca-certificates \
gcc \
libclang-dev \
libtss2-dev \
pkg-config
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
libclang-dev \
libtss2-dev \
pkg-config \
&& rm -r /var/lib/apt/lists /var/cache/apt/archives

# Copy Rust/Cargo files
COPY --from=build /opt/rust/ /opt/rust/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Version history

| **Release** | **Date** | **Base system** | **Rust toolchain** | **TPM2 Software Stack** |
| ----------- | ---------- | ------------------------------ | ------------------ | ----------------------- |
| r6 | 2024-09-10 | Debian 12.7, 2024-09-05 | 1.81.0 | 3.2.1-3 |
| r5 | 2024-09-05 | Minideb "Bookworm", 2024-08-31 | 1.81.0 | 3.2.1-3 |
| r4 | 2024-08-31 | Minideb "Bookworm", 2024-08-31 | 1.80.0 | 3.2.1-3 |
| r3 | 2024-08-30 | Debian 12, 2024-08-12 | 1.80.0 | 3.2.1-3 |

0 comments on commit 4cef61b

Please sign in to comment.