Skip to content

Add Ubuntu 24.04 Arm32 Helix Dockerfile #1120

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

Merged
merged 9 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
65 changes: 65 additions & 0 deletions src/ubuntu/24.04/helix/arm32v7/Dockerfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some differences between this file and https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/ubuntu/24.04/helix/Dockerfile. Are these differences intentional? I'm curious why the multi-arch Dockerfile that already exists doesn't work for Arm32?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue is that the package won't install as-is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also libcurl isn't available in the arm feed because of Y2038. libcurl4t64 is there in its place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like a trivial difference that could be handled dynamically within a single Dockerfile. You could check the value of TARGETARCH to determine whether to install libcurl4 or libcurl4t64, set the name to a variable and then include that variable name in the list of packages.

I'd really like to work hard to avoid duplication of content between Dockerfiles in this repo and set a better precedent than in the past.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good idea however that doesn't change the part about libmsquic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't that be conditionally executed as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can. It is just making the Dockerfile a bit complicated. However, I can give that a try.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. That wasn't quite as bad as I expected. I was able to single source the Dockerfile.

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
FROM ubuntu.azurecr.io/ubuntu:noble
ARG TARGETARCH
# Install Helix Dependencies
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -qq -y \
autoconf \
automake \
build-essential \
cmake \
clang \
curl \
gcc \
gdb \
git \
gss-ntlmssp \
iputils-ping \
libcurl4t64 \
libffi-dev \
libgdiplus \
libicu-dev \
libnuma1 \
libssl-dev \
libtool \
libunwind8 \
libunwind-dev \
lldb \
llvm \
libnuma1 \
locales \
locales-all \
openssl \
python3-dev \
python3-pip \
python3-venv \
software-properties-common \
sudo \
tzdata \
unzip \
&& rm -rf /var/lib/apt/lists/* \
\
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

ENV LANG=en_US.utf8

RUN ln -sf /usr/bin/python3 /usr/bin/python && \
pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \
pip install --break-system-packages ./helix_scripts-*-py3-none-any.whl

# Add MsQuic
# MsQuic does not yet publish packages for 24.04
# Manually install 22.04 package for now
RUN curl -LO https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/libm/libmsquic/libmsquic_2.3.5_armhf.deb && \
dpkg -i --ignore-depends=libssl3 libmsquic_*.deb && \
rm -f libmsquic_*.deb

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

USER helixbot

RUN python -m venv /home/helixbot/.vsts-env
18 changes: 18 additions & 0 deletions src/ubuntu/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,24 @@
"variant": "v8"
}
]
},
{
"platforms": [
{
"architecture": "arm",
"dockerfile": "src/ubuntu/24.04/helix/arm32v7",
"os": "linux",
"osVersion": "noble",
"tags": {
"ubuntu-24.04-helix-arm32v7-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {},
"ubuntu-24.04-helix-arm32v7$(FloatingTagSuffix)": {},
"ubuntu-24.04-helix-arm32v7-local": {
"isLocal": true
}
},
"variant": "v7"
}
]
}
]
}
Expand Down