Skip to content

Commit

Permalink
fix: avoid installing weak dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <[email protected]>
  • Loading branch information
NiccoloFei committed Nov 19, 2024
1 parent c019bc3 commit e91e699
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 24 deletions.
6 changes: 3 additions & 3 deletions UBI/Dockerfile-multiarch.template
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ RUN --mount=type=secret,id=cs_token \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
rm -fr /etc/rpm/macros.image-language-conf ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -71,7 +71,7 @@ RUN --mount=type=secret,id=cs_token \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down
6 changes: 3 additions & 3 deletions UBI/Dockerfile-multilang.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ RUN set -xe ; \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
rm -fr /etc/rpm/macros.image-language-conf ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -47,7 +47,7 @@ RUN set -xe ; \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down
6 changes: 3 additions & 3 deletions UBI/Dockerfile-plv8.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ RUN --mount=type=secret,id=cs_token \
esac ; \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -51,7 +51,7 @@ RUN --mount=type=secret,id=cs_token \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down
9 changes: 5 additions & 4 deletions UBI/Dockerfile-postgis-multiarch.template
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ RUN --mount=type=secret,id=cs_token \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
rm -fr /etc/rpm/macros.image-language-conf ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -72,7 +72,7 @@ RUN --mount=type=secret,id=cs_token \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down Expand Up @@ -126,7 +126,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \
*) \
exit 1 ;; \
esac ; \
yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
yum -y install --setopt=install_weak_deps=0 \
--enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \
"$pgrouting_pkg" \
; \
Expand Down
9 changes: 5 additions & 4 deletions UBI/Dockerfile-postgis-multilang.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ RUN set -xe ; \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
rm -fr /etc/rpm/macros.image-language-conf ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y --setopt=install_weak_deps=0 install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -48,7 +48,7 @@ RUN set -xe ; \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down Expand Up @@ -92,7 +92,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \
*) \
exit 1 ;; \
esac ; \
yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
yum -y install --setopt=install_weak_deps=0 \
--enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \
pgrouting_%%PG_MAJOR%% \
; \
Expand Down
9 changes: 5 additions & 4 deletions UBI/Dockerfile-postgis.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ RUN set -xe ; \
esac ; \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -47,7 +47,7 @@ RUN set -xe ; \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down Expand Up @@ -91,7 +91,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \
*) \
exit 1 ;; \
esac ; \
yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
yum -y install --setopt=install_weak_deps=0 \
--enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \
postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \
pgrouting_%%PG_MAJOR%% \
; \
Expand Down
6 changes: 3 additions & 3 deletions UBI/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ RUN set -xe ; \
esac ; \
yum -y upgrade glibc-common ; \
yum -y reinstall glibc-common ; \
yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \
yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \
yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \
postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \
postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \
Expand All @@ -46,7 +46,7 @@ RUN set -xe ; \

# Install barman-cloud
RUN set -xe ; \
yum -y install python3.11-pip python3.11-psycopg2 ; \
yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \
pip3.11 install --upgrade pip ; \
pip3.11 install -r requirements.txt ; \
yum -y clean all --enablerepo='*'
Expand Down

0 comments on commit e91e699

Please sign in to comment.