From dee2d19175efa795e2be84b28024112c5e4325d9 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Thu, 21 Apr 2022 08:32:33 -0400 Subject: [PATCH] Add helix dockerfile for CentOS Stream 9 (#581) Needed for runtime, eg https://github.com/dotnet/runtime/pull/65785 --- src/centos/manifest.json | 12 ++++++++ src/centos/stream9/helix/amd64/Dockerfile | 37 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/centos/stream9/helix/amd64/Dockerfile diff --git a/src/centos/manifest.json b/src/centos/manifest.json index 7d6ddf1eb..6941d0a93 100644 --- a/src/centos/manifest.json +++ b/src/centos/manifest.json @@ -131,6 +131,18 @@ } } ] + }, + { + "platforms": [ + { + "dockerfile": "src/centos/stream9/helix/amd64", + "os": "linux", + "osVersion": "centos-stream9", + "tags": { + "centos-stream9-helix-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {} + } + } + ] } ] } diff --git a/src/centos/stream9/helix/amd64/Dockerfile b/src/centos/stream9/helix/amd64/Dockerfile new file mode 100644 index 000000000..c21affe38 --- /dev/null +++ b/src/centos/stream9/helix/amd64/Dockerfile @@ -0,0 +1,37 @@ +FROM quay.io/centos/centos:stream9-development + +# Install dependencies +RUN dnf install --setopt tsflags=nodocs --refresh -y \ + dnf-plugins-core \ + && \ + dnf config-manager --set-enabled crb \ + && \ + dnf install --setopt tsflags=nodocs -y \ + gcc \ + libicu \ + openssl \ + python3 \ + python3-devel \ + sudo \ + tar \ + wget \ + which \ + && \ + dnf clean all + +RUN ln -sf /usr/bin/python3 /usr/bin/python && \ + python -m pip install --upgrade pip==20.2 && \ + python -m pip install virtualenv==16.6.0 && \ + 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 + +ENV LANG=en_US.utf8 + +# create helixbot user and give rights to sudo without password +RUN /usr/sbin/adduser --uid 1000 --shell /bin/bash --gid adm helixbot && \ + chmod 755 /root && \ + echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + +USER helixbot + +RUN python -m virtualenv --no-site-packages /home/helixbot/.vsts-env