Skip to content

Commit

Permalink
Fix UBI image: Add -y option to install of hostname
Browse files Browse the repository at this point in the history
Summary:
dnf install hostname was failing waiting for user interaction.  Add the -y option
to avoid that.

Test Plan: Built the UBI:8 image locally

Reviewers: devops, dshubin, steve.varnau

Reviewed By: dshubin, steve.varnau

Subscribers: devops

Differential Revision: https://phorge.dev.yugabyte.com/D38602
  • Loading branch information
jharveysmith committed Oct 1, 2024
1 parent aad5695 commit fa38152
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker/images/yugabyte/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ ENV YB_DEVOPS_USE_PYTHON3=1
WORKDIR $YB_HOME

# Create some yum aliases for use in this Dockerfile
ARG yum_install="yum install --disableplugin=subscription-manager"
ARG yum_upgrade="yum upgrade --disableplugin=subscription-manager"
ARG yum_install="yum install --disableplugin=subscription-manager -y"
ARG yum_upgrade="yum upgrade --disableplugin=subscription-manager -y"

# Add the almalinux8 package repo if we are building for ubi.
RUN <<EOF
Expand All @@ -67,20 +67,20 @@ EOF

# Install hostname for ubi8 images.
RUN if [[ "$BASE_IMAGE" == "registry.access.redhat.com/ubi8/ubi"* ]]; then \
dnf install hostname; \
$yum_install hostname; \
fi

# Ensure our base system is fully up to date
RUN set -x; \
$yum_upgrade -y \
$yum_upgrade \
&& rm -rf ~/.cache \
&& yum clean all && rm -rf /var/cache/yum

# Install required python packages first
# this should leave us with python3.8 as the default python3
# We need to explicitly remove the old pip wheel file to avoid tripping vulnerability scans
RUN set -x ; \
$yum_install -y \
$yum_install \
python38-devel \
python38-pip \
python38-psutil \
Expand Down

0 comments on commit fa38152

Please sign in to comment.