Skip to content

Commit a1f9239

Browse files
authored
ci: update gcc version for bionic-arm32v7 agent (microsoft#40)
* ci: update gcc version for bionic-arm32v7 agent * chore: remove updating npm step Newer npm versions are not compatible with v16 ``` npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: [email protected] npm ERR! notsup Not compatible with your version of node/npm: [email protected] npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"} npm ERR! notsup Actual: {"npm":"8.19.4","node":"v16.20.2"} ``` * chore: cleanup nodesource installations
1 parent 7db8089 commit a1f9239

File tree

6 files changed

+37
-51
lines changed

6 files changed

+37
-51
lines changed

bionic-arm32v7/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ RUN groupadd --gid 1000 builduser \
77

88
RUN apt-get update && apt-get install -y --no-install-recommends \
99
software-properties-common \
10-
gcc \
11-
g++ \
10+
gcc-8 \
11+
g++-8 \
1212
binutils \
1313
build-essential \
1414
git \
@@ -32,4 +32,8 @@ RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
3232
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
3333

3434
USER builduser
35-
WORKDIR /home/builduser
35+
WORKDIR /home/builduser
36+
37+
ENV CC=/usr/bin/gcc-8 \
38+
CPP=/usr/bin/cpp-8 \
39+
CXX=/usr/bin/g++-8

bionic-arm64/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,18 @@ RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
4444
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
4545
RUN python --version
4646

47-
# Yarn
48-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
49-
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
50-
RUN apt-get update && apt-get install -y yarn
51-
52-
# Node.js
53-
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
54-
RUN apt-get update && apt-get install -y nodejs
55-
RUN npm install -g npm@latest
56-
RUN npm install -g node-gyp
57-
5847
# Install docker client
5948
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
6049
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
6150
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
62-
RUN sudo apt-get update && sudo apt-get install -y docker-ce
51+
RUN apt-get update && apt-get install -y docker-ce
52+
53+
# Node.js
54+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
55+
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
56+
RUN apt-get update && apt-get install -y nodejs
57+
RUN npm install -g yarn
58+
RUN npm install -g node-gyp
6359

6460
USER builduser
6561
WORKDIR /home/builduser

bionic-armhf/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,18 @@ RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
4444
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
4545
RUN python --version
4646

47-
# Yarn
48-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
49-
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
50-
RUN apt-get update && apt-get install -y yarn
51-
52-
# Node.js
53-
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
54-
RUN apt-get update && apt-get install -y nodejs
55-
RUN npm install -g npm@latest
56-
RUN npm install -g node-gyp
57-
5847
# Install docker client
5948
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
6049
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
6150
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
62-
RUN sudo apt-get update && sudo apt-get install -y docker-ce
51+
RUN apt-get update && apt-get install -y docker-ce
52+
53+
# Node.js
54+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
55+
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
56+
RUN apt-get update && apt-get install -y nodejs
57+
RUN npm install -g yarn
58+
RUN npm install -g node-gyp
6359

6460
USER builduser
6561
WORKDIR /home/builduser

bionic-x64/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,6 @@ RUN apt-get update && apt-get install -y \
5858
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
5959
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
6060

61-
# Yarn
62-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
63-
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
64-
RUN apt-get update && apt-get install -y yarn
65-
66-
# Node.js
67-
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | sudo -E bash -
68-
RUN apt-get update && apt-get install -y nodejs
69-
RUN npm install -g npm@latest
70-
RUN npm install -g node-gyp
71-
7261
# Set python3 as default
7362
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
7463
RUN python --version
@@ -77,7 +66,14 @@ RUN python --version
7766
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
7867
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
7968
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
80-
RUN sudo apt-get update && sudo apt-get install -y docker-ce
69+
RUN apt-get update && apt-get install -y docker-ce
70+
71+
# Node.js
72+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
73+
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
74+
RUN apt-get update && apt-get install -y nodejs
75+
RUN npm install -g yarn
76+
RUN npm install -g node-gyp
8177

8278
# Check compiler toolchain
8379
RUN gcc --version

centos7-devtoolset8-arm64/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@ ARG INSTALL_PKGS="devtoolset-8-gcc \
1010
sudo \
1111
libsecret-devel \
1212
krb5-devel \
13-
nodejs \
1413
python3"
1514

16-
# setup nodejs repo
17-
RUN curl --silent --location https://rpm.nodesource.com/setup_16.x | bash -
18-
1915
RUN yum install -y centos-release-scl-rh && \
2016
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
2117
rpm -V $INSTALL_PKGS && \
2218
yum -y clean all --enablerepo='*'
2319

24-
# update npm and install yarn, node-gyp
25-
RUN npm install -g npm@latest
20+
# install nodejs
21+
RUN yum install https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
22+
RUN yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
2623
RUN npm install -g yarn
2724
RUN npm install -g node-gyp
2825

centos7-devtoolset8-x64/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@ ARG INSTALL_PKGS="devtoolset-8-gcc \
1212
sudo \
1313
libsecret-devel \
1414
krb5-devel \
15-
nodejs \
1615
python3"
1716

18-
# setup nodejs repo
19-
RUN curl --silent --location https://rpm.nodesource.com/setup_16.x | bash -
20-
2117
RUN yum install -y centos-release-scl-rh && \
2218
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
2319
rpm -V $INSTALL_PKGS && \
2420
yum -y clean all --enablerepo='*'
2521

26-
# update npm and install yarn, node-gyp
27-
RUN npm install -g npm@latest
22+
# install nodejs
23+
RUN yum install https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
24+
RUN yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
2825
RUN npm install -g yarn
2926
RUN npm install -g node-gyp
3027

0 commit comments

Comments
 (0)