Skip to content

Commit

Permalink
in_podman: use tmpfs
Browse files Browse the repository at this point in the history
Signed-off-by: flouthoc <[email protected]>
  • Loading branch information
flouthoc committed Feb 3, 2025
1 parent 77b80d0 commit c7dbcd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions contrib/cirrus/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,13 @@ in_podman() {
envargs+=("-e" "$var")
done <<<"$(passthrough_envars)"

mount -t tmpfs -o size=75%,mode=0700 none /tmp

showrun podman run -i --name="$IN_PODMAN_NAME" \
--net=host \
--privileged \
--cgroupns=host \
--tmpfs /tmp:mode=1777 \
"${envargs[@]}" \
-e BUILDAH_ISOLATION \
-e STORAGE_DRIVER \
Expand All @@ -205,6 +208,7 @@ in_podman() {
-v "$HOME/auth:$HOME/auth:ro" \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
-v /dev/fuse:/dev/fuse:rw \
-v /tmp:/var/lib/containers:rw \
-v "$GOSRC:$GOSRC:z" \
--workdir "$GOSRC" \
"$@"
Expand Down
9 changes: 6 additions & 3 deletions contrib/cirrus/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ esac
# Previously, golang was not installed
source $(dirname $0)/lib.sh

# mount a tmpfs for the container storage to speed up the IO
# side effect is we clear all potentially pre existing data so we know we always start "clean"
mount -t tmpfs -o size=75%,mode=0700 none /var/lib/containers
if [[ "${IN_PODMAN:-false}" != "true" ]]
then
# mount a tmpfs for the container storage to speed up the IO
# side effect is we clear all potentially pre existing data so we know we always start "clean"
mount -t tmpfs -o size=75%,mode=0700 none /var/lib/containers
fi

echo "Configuring /etc/containers/registries.conf"
mkdir -p /etc/containers
Expand Down

0 comments on commit c7dbcd8

Please sign in to comment.