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

Update almalinux images to include package upgrade logic #1231

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions src/almalinux/8/helix/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
FROM library/almalinux:8

# Add microsoft centos/8 repo for libmsquic.
# (Use centos/8 rather than rhel/8 because the latter doesn't have
# libmsquic except in the 8.1-specific packages feed.)
RUN rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm && \
yum update -y && \
yum install -y \
RUN dnf upgrade --refresh -y \
&& dnf install -y \
'dnf-command(config-manager)' \
# Add microsoft centos/8 repo for libmsquic.
# (Use centos/8 rather than rhel/8 because the latter doesn't have
# libmsquic except in the 8.1-specific packages feed.)
&& dnf config-manager --add-repo=https://packages.microsoft.com/centos/8/prod/config.repo \
&& dnf install -y \
# Get recent python3 This is needed to get a pip recent enough
# not to fail the build when installing cryptography library as
# a dependency of the helix scripts.
python39 \
# Required for asp.net core test runs
sudo \
libicu \
libmsquic && \
yum clean all
libmsquic \
&& dnf clean all

RUN python3 -m pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \
python3 -m pip install ./helix_scripts-*-py3-none-any.whl
RUN python3 -m pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple \
&& python3 -m pip install ./helix_scripts-*-py3-none-any.whl

# Aspnetcore test runs expect python to be available without version suffix
RUN alternatives --set python /usr/bin/python3 && \
ln -sf /usr/bin/pip3 /usr/bin/pip
RUN alternatives --set python /usr/bin/python3 \
&& ln -sf /usr/bin/pip3 /usr/bin/pip

ENV LANG=en-US.UTF-8

# create helixbot user and give rights to sudo without password
RUN adduser --uid 1000 --shell /bin/bash --gid adm helixbot && \
chmod 755 /root && \
echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
RUN adduser --uid 1000 --shell /bin/bash --gid adm helixbot \
&& chmod 755 /root \
&& echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers

USER helixbot

Expand Down
19 changes: 9 additions & 10 deletions src/almalinux/8/source-build/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM library/almalinux:8

# Install dependencies
RUN dnf install -y \
'dnf-command(config-manager)' \
epel-release && \
dnf config-manager --set-enabled powertools && \
dnf config-manager --set-enabled epel && \
dnf install -y \
RUN dnf upgrade --refresh -y \
&& dnf install -y \
'dnf-command(config-manager)' \
epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf config-manager --set-enabled epel \
&& dnf install -y \
MichaelSimons marked this conversation as resolved.
Show resolved Hide resolved
"perl(Time::HiRes)" \
autoconf \
automake \
Expand Down Expand Up @@ -41,8 +42,6 @@ RUN dnf install -y \
which \
xz \
zlib-devel \
&& \
dnf module install -y \
&& dnf module install -y \
nodejs:20 \
&& \
dnf clean all
&& dnf clean all