Skip to content

Commit c6b5814

Browse files
authored
ci: switch back to using bionic agent for x64 linux (microsoft#38)
1 parent 28d7221 commit c6b5814

File tree

5 files changed

+91
-2
lines changed

5 files changed

+91
-2
lines changed
File renamed without changes.
File renamed without changes.

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
jobs:
2-
- job: focal_x64
2+
- job: bionic_x64
33
pool:
44
vmImage: 'ubuntu-latest'
55
steps:
66
- template: build.yml
77
parameters:
8-
arch: focal-x64
8+
arch: bionic-x64
99

1010
- job: centos7_devtoolset8_x64
1111
pool:

bionic-x64/Dockerfile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
ARG REPO=mcr.microsoft.com/mirror/docker/library/ubuntu
2+
ARG TAG=18.04
3+
FROM ${REPO}:${TAG}
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
7+
RUN groupadd --gid 1000 builduser \
8+
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser \
9+
&& mkdir -p /setup
10+
11+
# Set up TEMP directory
12+
ENV TEMP=/tmp
13+
RUN chmod a+rwx /tmp
14+
15+
# Latest stable git
16+
RUN apt-get update && apt-get install -y software-properties-common
17+
RUN add-apt-repository ppa:git-core/ppa -y
18+
19+
RUN apt-get update && apt-get install -y \
20+
apt-transport-https \
21+
ca-certificates \
22+
curl \
23+
file \
24+
git \
25+
gnome-keyring \
26+
iproute2 \
27+
libfuse2 \
28+
libgconf-2-4 \
29+
libgdk-pixbuf2.0-0 \
30+
libgl1 \
31+
libgtk-3.0 \
32+
libsecret-1-dev \
33+
libssl-dev \
34+
libx11-dev \
35+
libx11-xcb-dev \
36+
libxkbfile-dev \
37+
locales \
38+
lsb-release \
39+
lsof \
40+
python-dbus \
41+
python3-pip \
42+
sudo \
43+
wget \
44+
xvfb \
45+
tzdata \
46+
unzip \
47+
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.sh \
48+
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.py\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.py \
49+
# Remove snapcraft to avoid issues on docker build
50+
&& sed -i 's/packages.append("snapcraft")/#packages.append("snapcraft")/g' /setup/install-build-deps.py \
51+
&& chmod +x /setup/install-build-deps.sh \
52+
&& chmod +x /setup/install-build-deps.py \
53+
&& bash /setup/install-build-deps.sh --no-syms --no-prompt --no-chromeos-fonts --no-arm --no-nacl \
54+
&& rm -rf /var/lib/apt/lists/*
55+
56+
# Yarn
57+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
58+
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
59+
RUN apt-get update && apt-get install -y yarn
60+
61+
# No Sudo Prompt
62+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
63+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
64+
65+
# Dotnet
66+
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
67+
RUN dpkg -i packages-microsoft-prod.deb
68+
RUN apt-get update && apt-get install -y dotnet-sdk-2.1
69+
70+
# Set python3 as default
71+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
72+
RUN python --version
73+
74+
# Add xvfb init script
75+
COPY xvfb-init.sh /etc/init.d/xvfb
76+
RUN chmod a+x /etc/init.d/xvfb
77+
78+
# Setup dbus path
79+
RUN sudo mkdir -p /var/run/dbus
80+
81+
# Check compiler toolchain
82+
RUN gcc --version
83+
RUN g++ --version
84+
85+
USER builduser
86+
WORKDIR /home/builduser

bionic-x64/xvfb-init.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
XVFB=/usr/bin/Xvfb
2+
XVFBARGS=":10 -ac -screen 0 1280x800x24 -nolisten tcp -dpi 96 +extension RANDR"
3+
/sbin/start-stop-daemon --start --quiet --background --exec $XVFB -- $XVFBARGS

0 commit comments

Comments
 (0)