@@ -5,34 +5,33 @@ ARG PHP_VERSION
5
5
6
6
ENV DEBIAN_FRONTEND=noninteractive
7
7
8
- RUN apt-get update \
9
- && apt-get install -y --no-install-recommends \
10
- git zip unzip wget \
11
- && rm -rf /var/lib/apt/lists/*
8
+ RUN apt-get update
9
+
10
+ RUN apt-get install -y --no-install-recommends \
11
+ git zip unzip wget
12
12
13
13
# Add repositories
14
- RUN apt-get update \
15
- && apt-get install -y --no-install-recommends \
16
- apt-transport-https \
17
- ca-certificates \
18
- curl \
19
- gnupg-agent \
20
- gnupg \
21
- software-properties-common \
22
- gettext-base \
23
- && rm -rf /var/lib/apt/lists/* \
24
- && curl -sSL http://debian.hypernode.com/repo.key | apt-key add - \
25
- && echo "deb http://debian.hypernode.com bookworm main hypernode" | tee /etc/apt/sources.list.d/hypernode.list \
26
- && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
27
- && echo "deb http://deb.nodesource.com/node_${NODE_VERSION}.x bookworm main" | tee /etc/apt/sources.list.d/nodesource.list \
14
+ RUN apt-get install -y --no-install-recommends \
15
+ apt-transport-https \
16
+ ca-certificates \
17
+ curl \
18
+ gnupg-agent \
19
+ gnupg \
20
+ software-properties-common \
21
+ gettext-base
22
+
23
+ RUN apt-get clean \
24
+ && curl -fsSL http://debian.hypernode.com/repo.key | gpg --dearmor -o /usr/share/keyrings/hypernode.gpg \
25
+ && echo "deb [signed-by=/usr/share/keyrings/hypernode.gpg] http://debian.hypernode.com bookworm main hypernode" > /etc/apt/sources.list.d/hypernode.list \
28
26
&& echo \
29
- "Package: * \
30
- Pin origin deb.nodesource.com \
31
- Pin-Priority: 1001" > /etc/apt/preferences.d/nodejs
27
+ "Package: * \
28
+ Pin origin debian.hypernode.com \
29
+ Pin-Priority: 1000" > /etc/apt/preferences.d/hypernode
30
+
31
+ RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
32
32
33
33
# Install dependencies
34
- RUN apt-get update && \
35
- apt-get install -y --no-install-recommends \
34
+ RUN apt-get install -y --no-install-recommends \
36
35
openssh-client \
37
36
rsync \
38
37
git \
@@ -52,8 +51,10 @@ RUN apt-get update && \
52
51
nodejs \
53
52
gnupg \
54
53
zip \
55
- bc \
56
- && apt install -y --no-install-recommends \
54
+ bc
55
+
56
+ # Install PHP
57
+ RUN apt-get install -y --no-install-recommends \
57
58
php${PHP_VERSION} \
58
59
php${PHP_VERSION}-amqp \
59
60
php${PHP_VERSION}-bcmath \
@@ -78,15 +79,10 @@ RUN apt-get update && \
78
79
php${PHP_VERSION}-soap \
79
80
php${PHP_VERSION}-tidy \
80
81
php${PHP_VERSION}-xml \
81
- php${PHP_VERSION}-zip \
82
- && rm -rf /var/lib/apt/lists/*
83
-
84
- # Only install npm if node version is less than 20, otherwise it's already installed
85
- RUN if [ "${NODE_VERSION}" -lt 20 ]; then \
86
- apt-get update \
87
- && apt-get install -y --no-install-recommends npm \
88
- && rm -rf /var/lib/apt/lists/*; \
89
- fi
82
+ php${PHP_VERSION}-zip
83
+
84
+ # Confirm NodeJS & NPM are installed
85
+ RUN node -v && npm -v
90
86
91
87
COPY ./.git /hypernode/.git
92
88
COPY ./bin /hypernode/bin
0 commit comments