Skip to content

Commit

Permalink
dbld: Update docker container before installing packages to avoid out…
Browse files Browse the repository at this point in the history
… of date pacakges to break the image build

Signed-off-by: Kovacs, Gergo Ferenc <[email protected]>
  • Loading branch information
kovgeri01 authored and OverOrion committed Oct 3, 2024
1 parent ba344fa commit d9e6175
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dbld/builddeps
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ APT_INSTALL="apt-get install -y --no-install-recommends"
set -e
set -x

function update_packages() {
case "${OS_DISTRIBUTION}" in
centos|almalinux)
yum update -y
;;
debian|ubuntu)
apt-get update
apt-get upgrade -y
;;
fedora)
dnf upgrade -y
;;
esac
}

function workaround_rpm_repos() {
MIRROR_URL='https://ftp.halifax.rwth-aachen.de/fedora/linux'
case "${OS_DISTRIBUTION}" in
Expand Down
1 change: 1 addition & 0 deletions dbld/images/almalinux-8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL COMMIT=${COMMIT}
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps add_epel_repo
RUN /dbld/builddeps add_copr_repo
Expand Down
1 change: 1 addition & 0 deletions dbld/images/almalinux-9.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL COMMIT=${COMMIT}
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps add_epel_repo
RUN /dbld/builddeps add_copr_repo
Expand Down
1 change: 1 addition & 0 deletions dbld/images/centos-7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL COMMIT=${COMMIT}
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps add_epel_repo
RUN /dbld/builddeps add_copr_repo
Expand Down
1 change: 1 addition & 0 deletions dbld/images/debian-bookworm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/debian-bullseye.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/debian-sid.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/debian-testing.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/fedora-39.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL COMMIT=${COMMIT}
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps workaround_rpm_repos
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps add_copr_repo
Expand Down
1 change: 1 addition & 0 deletions dbld/images/fedora-40.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL COMMIT=${COMMIT}
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps workaround_rpm_repos
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps add_copr_repo
Expand Down
1 change: 1 addition & 0 deletions dbld/images/ubuntu-focal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/ubuntu-jammy.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/ubuntu-lunar.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/ubuntu-mantic.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down
1 change: 1 addition & 0 deletions dbld/images/ubuntu-noble.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ENV LANG C.UTF-8
COPY images/entrypoint.sh /
COPY . /dbld/

RUN /dbld/builddeps update_packages
RUN /dbld/builddeps install_dbld_dependencies
RUN /dbld/builddeps install_apt_packages
RUN /dbld/builddeps install_debian_build_deps
Expand Down

0 comments on commit d9e6175

Please sign in to comment.