Skip to content

Commit

Permalink
build_container.sh: use eatmydata for apt operations
Browse files Browse the repository at this point in the history
eatmydata disables fsync and similar operations to speed up data
operations for ephemeral tasks (like building a container image).

See: https://packages.debian.org/bookworm/eatmydata

Signed-off-by: Manos Pitsidianakis <[email protected]>
  • Loading branch information
epilys committed Nov 13, 2023
1 parent 497ed4a commit 6edae3a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions build_container.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env bash
set -ex

apt-get update

# DEBIAN_FRONTEND is set for tzdata.
DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
export DEBIAN_FRONTEND="noninteractive"

apt-get update && \
apt-get install -y eatmydata


eatmydata apt-get install --no-install-recommends -y \
curl gcc git python3 python3-pip shellcheck \
libssl-dev tzdata cmake g++ pkg-config jq libcurl4-openssl-dev libelf-dev \
libdw-dev binutils-dev libiberty-dev make \
Expand All @@ -15,9 +19,9 @@ DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
debhelper-compat libdbus-1-dev libglib2.0-dev meson ninja-build dbus

# cleanup
apt-get clean && rm -rf /var/lib/apt/lists/*
eatmydata apt-get clean && rm -rf /var/lib/apt/lists/*

pip3 install --no-cache-dir pytest pexpect boto3 pytest-timeout && apt purge -y python3-pip
pip3 install --no-cache-dir pytest pexpect boto3 pytest-timeout && eatmydata apt purge -y python3-pip

# Install rustup and a fixed version of Rust.
curl https://sh.rustup.rs -sSf | sh -s -- \
Expand Down

0 comments on commit 6edae3a

Please sign in to comment.