1
+ ARG NODE_MAJOR=20
2
+
1
3
# Aliasing base images, so we can change just this, when needing to upgrade or pull base layers
2
4
FROM ubuntu:22.04 AS base-distro
3
5
FROM composer:2.4.4 AS composer
4
6
5
-
6
7
FROM base-distro AS install-markdownlint
8
+ ARG NODE_MAJOR
9
+ ENV NODE_MAJOR=$NODE_MAJOR
7
10
8
11
# Install system dependencies first - these don't change much
9
12
RUN export DEBIAN_FRONTEND=noninteractive \
10
- && (curl -ssL https://deb.nodesource.com/setup_20.x | bash -) \
11
13
&& apt update \
12
14
&& apt install -y --no-install-recommends \
13
- npm \
15
+ ca-certificates \
16
+ curl \
17
+ gnupg \
18
+ && mkdir -p /etc/apt/keyrings \
19
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
20
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
21
+ && apt update \
22
+ && apt install -y --no-install-recommends \
23
+ nodejs \
14
24
&& apt clean
15
25
16
26
COPY setup/markdownlint/package.json \
@@ -30,14 +40,15 @@ RUN cd /markdownlint \
30
40
31
41
32
42
FROM base-distro
33
-
43
+ ARG NODE_MAJOR
34
44
LABEL "repository" ="http://github.com/laminas/laminas-continuous-integration-action"
35
45
LABEL "homepage" ="http://github.com/laminas/laminas-continuous-integration-action"
36
46
LABEL "maintainer" ="https://github.com/laminas/technical-steering-committee/"
37
47
38
48
ENV COMPOSER_HOME=/usr/local/share/composer \
39
49
DEBIAN_FRONTEND=noninteractive \
40
- ACCEPT_EULA=Y
50
+ ACCEPT_EULA=Y \
51
+ NODE_MAJOR=$NODE_MAJOR
41
52
42
53
# This may look a bit long, but it's just a big `apt install` section, followed by a cleanup,
43
54
# so that we get a single compact layer, with not too many layer overwrites.
@@ -48,14 +59,19 @@ RUN export OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d '"' -f2)
48
59
curl \
49
60
gpg-agent \
50
61
software-properties-common \
62
+ ca-certificates \
63
+ gnupg \
51
64
&& (curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg) \
52
65
&& add-apt-repository -y ppa:ondrej/php \
53
66
&& curl -sSL https://packages.microsoft.com/config/ubuntu/$OS_VERSION/prod.list | tee /etc/apt/sources.list.d/microsoft.list \
54
- && (curl -ssL https://deb.nodesource.com/setup_20.x | bash -) \
67
+ && mkdir -p /etc/apt/keyrings \
68
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
69
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
55
70
&& apt update \
56
71
&& apt install -y --no-install-recommends \
57
72
# Base dependencies
58
73
git \
74
+ nodejs \
59
75
jq \
60
76
libxml2-utils \
61
77
libzip-dev \
0 commit comments