From c41d95c6240d90bcc74846a9d9dc9891cf24004f Mon Sep 17 00:00:00 2001 From: Richard Lander Date: Thu, 8 Aug 2024 16:55:46 -0700 Subject: [PATCH] Add helix images for Azure Linux 3.0 --- src/azurelinux/3.0/helix/Dockerfile | 36 +++++++++++++++++++++++ src/azurelinux/manifest.json | 44 +++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 src/azurelinux/3.0/helix/Dockerfile diff --git a/src/azurelinux/3.0/helix/Dockerfile b/src/azurelinux/3.0/helix/Dockerfile new file mode 100644 index 000000000..ff01a31d9 --- /dev/null +++ b/src/azurelinux/3.0/helix/Dockerfile @@ -0,0 +1,36 @@ +FROM mcr.microsoft.com/azurelinux/base/core:3.0 + +# Install Helix Dependencies + +ENV LANG=en_US.utf8 + +RUN tdnf install --setopt tsflags=nodocs --refresh -y \ + build-essential \ + ca-certificates-microsoft \ + gcc \ + icu \ + iputils \ + llvm \ + python3-devel \ + python3-pip \ + shadow-utils \ + tar \ + tzdata \ + which \ + && tdnf clean all + +RUN ln -sf /usr/bin/python3 /usr/bin/python && \ + python -m pip install --upgrade setuptools && \ + pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \ + pip install ./helix_scripts-*-py3-none-any.whl && \ + rm ./helix_scripts-*-py3-none-any.whl + +# create helixbot user and give rights to sudo without password +RUN /usr/sbin/useradd -c '' --uid 1000 --shell /bin/bash --groups adm helixbot && \ + chmod 755 /root && \ + echo "helixbot ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ + mkdir /home/helixbot/ && chown -R helixbot /home/helixbot/ + +USER helixbot + +RUN python -m venv /home/helixbot/.vsts-env diff --git a/src/azurelinux/manifest.json b/src/azurelinux/manifest.json index a461f273b..eb2d158df 100644 --- a/src/azurelinux/manifest.json +++ b/src/azurelinux/manifest.json @@ -508,6 +508,50 @@ } } ] + }, + { + "platforms": [ + { + "architecture": "amd64", + "dockerfile": "src/azurelinux/3.0/helix", + "os": "linux", + "osVersion": "azurelinux3.0", + "tags": { + "azurelinux-3.0-helix-amd64$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {}, + "azurelinux-3.0-helix-amd64-$(FloatingTagSuffix)": {} + } + } + ] + }, + { + "platforms": [ + { + "architecture": "arm64", + "dockerfile": "src/azurelinux/3.0/helix", + "os": "linux", + "osVersion": "azurelinux3.0", + "tags": { + "azurelinux-3.0-helix-arm64v8$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {}, + "azurelinux-3.0-helix-arm64v8-$(FloatingTagSuffix)": {} + }, + "variant": "v8" + } + ] + }, + { + "platforms": [ + { + "architecture": "arm", + "dockerfile": "src/azurelinux/3.0/helix", + "os": "linux", + "osVersion": "azurelinux3.0", + "tags": { + "azurelinux-3.0-helix-arm32v7$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {}, + "azurelinux-3.0-helix-arm32v7-$(FloatingTagSuffix)": {} + }, + "variant": "v7" + } + ] } ] }