Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: tweaks to make public build dockerfile portable between fedora/ubuntu distros #18301

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,21 @@ case "$ID" in
ubuntu | debian | pop)
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y "${deb_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
rm -rf /var/lib/apt/lists/*
fi
;;
fedora)
dnf install -y "${fedora_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
dnf clean all
fi
;;
arch | manjaro)
pacman -Sy --needed --noconfirm "${arch_deps[@]}"
if [[ $CLEAN_PKG_CACHE == true ]]; then
pacman -Sc
fi
;;
*)
echo "Please help us make the script better by sending patches with your OS $ID"
Expand Down
7 changes: 4 additions & 3 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM fedora:38
ARG BASE_IMAGE_OS_NAME=fedora
ARG BASE_IMAGE_OS_VERSION=38
FROM ${BASE_IMAGE_OS_NAME}:${BASE_IMAGE_OS_VERSION}

COPY --chown=0:0 install-dependencies.sh /

RUN /install-dependencies.sh && \
dnf clean all && \
RUN CLEAN_PKG_CACHE=true /install-dependencies.sh && \
rm install-dependencies.sh