-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (64 loc) · 2.22 KB
/
Copy pathDockerfile
File metadata and controls
75 lines (64 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM library/fedora:41 AS venv
RUN dnf upgrade --refresh -y \
&& dnf install --setopt tsflags=nodocs -y \
dnf-plugins-core \
&& dnf install --setopt=install_weak_deps=False --setopt tsflags=nodocs -y \
openssl \
python3-devel \
python3-pip \
gcc \
libatomic \
redhat-rpm-config \
&& dnf clean all
RUN python3 -m venv /venv \
&& source /venv/bin/activate \
&& 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
FROM library/fedora:41
# Install MSQuic. Fedora 41 does not have it in the repositories, so use the Fedora 40 package
RUN dnf config-manager addrepo --from-repofile=https://packages.microsoft.com/fedora/40/prod/config.repo \
&& dnf install --setopt=install_weak_deps=False --setopt tsflags=nodocs -y \
libmsquic
# Install Dependencies
RUN dnf upgrade --refresh -y \
&& dnf install --setopt tsflags=nodocs -y \
dnf-plugins-core \
&& dnf install --setopt=install_weak_deps=False --setopt tsflags=nodocs -y \
# Helix dependencies
python3 \
python3-pip \
# Tools used by build automation
azure-cli \
git \
jq \
tar \
redhat-rpm-config \
procps \
zip \
# Runtime dependencies
curl \
icu \
iputils \
krb5-libs \
libatomic \
libunwind \
lttng-ust \
openssl \
sudo \
&& dnf clean all
ENV \
# Needed for .NET libraries tests to pass
LANG=en-US.UTF-8
# create helixbot user and give rights to sudo without password
# Fedora does not have all options as other Linux systems
RUN /usr/sbin/adduser --uid 1000 --shell /bin/bash --group adm helixbot \
&& chmod 755 /root \
&& echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot \
&& chmod +s /usr/bin/ping
USER helixbot
ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
# Install Helix Dependencies
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
COPY --from=venv --chown=helixbot /venv $VIRTUAL_ENV