Skip to content

Commit fb9f313

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 48adf4d + 7db8089 commit fb9f313

File tree

14 files changed

+209
-11
lines changed

14 files changed

+209
-11
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
arch: [focal-x64, bionic-arm64, bionic-armhf, centos7-devtoolset8-x64, centos7-devtoolset8-arm64]
13+
arch: [bionic-x64, bionic-arm64, bionic-armhf, centos7-devtoolset8-x64, centos7-devtoolset8-arm64]
1414
include:
1515
- arch: centos7-devtoolset8-arm64
1616
qemu: true

alpine-arm64/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
FROM arm64v8/node:14.16.0-alpine
1+
ARG REPO=alpine
2+
ARG TAG=3.16
3+
FROM arm64v8/${REPO}:${TAG}
24

3-
RUN apk add g++ python make git bash curl perl pkgconfig libsecret-dev && uname -m
5+
RUN apk add nodejs npm g++ python3 make git bash curl perl pkgconfig libsecret-dev krb5-dev
6+
RUN npm install -g yarn
47

58
RUN mkdir -p /root/vscode
69
WORKDIR /root/vscode

alpine-x64/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
ARG REPO=node
2-
ARG TAG=14.16.0-alpine
1+
ARG REPO=alpine
2+
ARG TAG=3.16
33
FROM ${REPO}:${TAG}
44

5-
RUN apk add g++ python make git bash curl perl pkgconfig libsecret-dev
5+
RUN apk add nodejs npm g++ python3 make git bash curl perl pkgconfig libsecret-dev krb5-dev
6+
RUN npm install -g yarn
67

78
RUN mkdir -p /root/vscode
89
WORKDIR /root/vscode
File renamed without changes.
File renamed without changes.

azure-pipelines.yml

Lines changed: 11 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:
@@ -57,6 +57,15 @@ jobs:
5757
parameters:
5858
arch: bionic-armhf
5959

60+
- job: bionic_arm32v7
61+
pool:
62+
vmImage: 'ubuntu-latest'
63+
steps:
64+
- template: build.yml
65+
parameters:
66+
qemu: 'true'
67+
arch: bionic-arm32v7
68+
6069
- job: snapcraft_x64
6170
pool:
6271
vmImage: 'ubuntu-latest'

bionic-arm32v7/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM arm32v7/ubuntu:bionic
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
RUN groupadd --gid 1000 builduser \
6+
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
7+
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
software-properties-common \
10+
gcc \
11+
g++ \
12+
binutils \
13+
build-essential \
14+
git \
15+
pkg-config \
16+
sudo \
17+
apt-transport-https \
18+
ca-certificates \
19+
curl \
20+
gnupg \
21+
make \
22+
python3 \
23+
libkrb5-dev \
24+
unzip
25+
26+
# Set python3 as default
27+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
28+
RUN python --version
29+
30+
# No Sudo Prompt
31+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
32+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
33+
34+
# Github action need root user
35+
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
36+
# USER builduser
37+
# WORKDIR /home/builduser

bionic-arm64/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM ${REPO}:${TAG}
44

55
ARG DEBIAN_FRONTEND=noninteractive
66

7+
RUN groupadd --gid 1000 builduser \
8+
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
9+
710
# ubuntu keeps its i386/amd64 and other architecture repos separate
811
# the default i386/amd64 packages can be found in http://archive.ubuntu.com while all other architectures are in http://ports.ubuntu.com/
912
# add the required repos for armhf/arm64 and only fetch i386/amd64 from archive.ubuntu.com (to prevent apt from erroring about missing architecture support)
@@ -33,11 +36,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3336
libx11-xcb-dev:arm64 \
3437
libxkbfile-dev:arm64 \
3538
libsecret-1-dev:arm64 \
39+
libkrb5-dev:arm64 \
3640
curl \
3741
gnupg \
3842
unzip \
3943
jq
4044

45+
# No Sudo Prompt
46+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
47+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
48+
4149
# Set python3 as default
4250
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
4351
RUN python --version
@@ -47,6 +55,23 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
4755
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
4856
RUN apt-get update && apt-get install -y yarn
4957

58+
# Node.js
59+
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
60+
RUN apt-get update && apt-get install -y nodejs
61+
RUN npm install -g npm@latest
62+
RUN npm install -g node-gyp
63+
64+
# Install docker client
65+
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
66+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
67+
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
68+
RUN sudo apt-get update && sudo apt-get install -y docker-ce
69+
70+
# Github action need root user
71+
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
72+
# USER builduser
73+
# WORKDIR /home/builduser
74+
5075
ENV AS=/usr/bin/aarch64-linux-gnu-as \
5176
AR=/usr/bin/aarch64-linux-gnu-ar \
5277
CC=/usr/bin/aarch64-linux-gnu-gcc-8 \

bionic-armhf/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM ${REPO}:${TAG}
44

55
ARG DEBIAN_FRONTEND=noninteractive
66

7+
RUN groupadd --gid 1000 builduser \
8+
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
9+
710
# ubuntu keeps its i386/amd64 and other architecture repos separate
811
# the default i386/amd64 packages can be found in http://archive.ubuntu.com while all other architectures are in http://ports.ubuntu.com/
912
# add the required repos for armhf/arm64 and only fetch i386/amd64 from archive.ubuntu.com (to prevent apt from erroring about missing architecture support)
@@ -33,11 +36,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3336
libx11-xcb-dev:armhf \
3437
libxkbfile-dev:armhf \
3538
libsecret-1-dev:armhf \
39+
libkrb5-dev:armhf \
3640
curl \
3741
gnupg \
3842
unzip \
3943
jq
4044

45+
# No Sudo Prompt
46+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
47+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
48+
4149
# Set python3 as default
4250
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
4351
RUN python --version
@@ -47,6 +55,23 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
4755
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
4856
RUN apt-get update && apt-get install -y yarn
4957

58+
# Node.js
59+
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
60+
RUN apt-get update && apt-get install -y nodejs
61+
RUN npm install -g npm@latest
62+
RUN npm install -g node-gyp
63+
64+
# Install docker client
65+
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
66+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
67+
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
68+
RUN sudo apt-get update && sudo apt-get install -y docker-ce
69+
70+
# Github action need root user
71+
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
72+
# USER builduser
73+
# WORKDIR /home/builduser
74+
5075
ENV AS=/usr/bin/arm-linux-gnueabihf-as \
5176
AR=/usr/bin/arm-linux-gnueabihf-ar \
5277
CC=/usr/bin/arm-linux-gnueabihf-gcc-8 \

bionic-x64/Dockerfile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
ARG REPO=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+
libkrb5-dev \
34+
libssl-dev \
35+
libx11-dev \
36+
libx11-xcb-dev \
37+
libxkbfile-dev \
38+
locales \
39+
lsb-release \
40+
lsof \
41+
python-dbus \
42+
python3-pip \
43+
sudo \
44+
wget \
45+
xvfb \
46+
tzdata \
47+
unzip \
48+
jq \
49+
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.sh \
50+
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.py\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.py \
51+
# Remove snapcraft to avoid issues on docker build
52+
&& sed -i 's/packages.append("snapcraft")/#packages.append("snapcraft")/g' /setup/install-build-deps.py \
53+
&& chmod +x /setup/install-build-deps.sh \
54+
&& chmod +x /setup/install-build-deps.py \
55+
&& bash /setup/install-build-deps.sh --no-syms --no-prompt --no-chromeos-fonts --no-arm --no-nacl \
56+
&& rm -rf /var/lib/apt/lists/*
57+
58+
# No Sudo Prompt
59+
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
60+
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
61+
62+
# Yarn
63+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
64+
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
65+
RUN apt-get update && apt-get install -y yarn
66+
67+
# Node.js
68+
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
69+
RUN apt-get update && apt-get install -y nodejs
70+
RUN npm install -g npm@latest
71+
RUN npm install -g node-gyp
72+
73+
# Set python3 as default
74+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
75+
RUN python --version
76+
77+
# Install docker client
78+
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
79+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
80+
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
81+
RUN sudo apt-get update && sudo apt-get install -y docker-ce
82+
83+
# Check compiler toolchain
84+
RUN gcc --version
85+
RUN g++ --version
86+
87+
# Github action need root user
88+
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
89+
# USER builduser
90+
# WORKDIR /home/builduser

0 commit comments

Comments
 (0)