forked from dotnet/dotnet-buildtools-prereqs-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (53 loc) · 1.87 KB
/
Copy pathDockerfile
File metadata and controls
61 lines (53 loc) · 1.87 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
FROM debian:bullseye
# Install Helix Dependencies
RUN apt-get update && \
apt-get install -y \
autoconf \
automake \
at \
build-essential \
curl \
gcc \
gdb \
git \
iputils-ping \
libcurl4 \
libffi-dev \
libgdiplus \
libicu-dev \
libssl-dev \
libtool \
libunwind8 \
locales \
locales-all \
python3-dev \
python3-pip \
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 && \
curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py --fail --silent --show-error && \
python ./get-pip.py && rm ./get-pip.py && \
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
# Add MsQuic
COPY microsoft.asc /tmp
RUN apt-key add /tmp/microsoft.asc \
&& rm /tmp/microsoft.asc \
&& apt-add-repository https://packages.microsoft.com/debian/11/prod \
&& apt-get update \
&& apt-get install -y libmsquic \
&& rm -rf /var/lib/apt/lists/*
# Create helixbot user and give rights to sudo without password
# additionally, preinstall the virtualenv packages used for VSTS reporting to save time
RUN /usr/sbin/adduser --disabled-password --gecos '' --uid 1000 --shell /bin/bash --ingroup 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