@@ -5,34 +5,33 @@ ARG PHP_VERSION
55
66ENV DEBIAN_FRONTEND=noninteractive
77
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
1212
1313# 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 \
2826 && 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 -
3232
3333# Install dependencies
34- RUN apt-get update && \
35- apt-get install -y --no-install-recommends \
34+ RUN apt-get install -y --no-install-recommends \
3635 openssh-client \
3736 rsync \
3837 git \
@@ -52,9 +51,12 @@ RUN apt-get update && \
5251 nodejs \
5352 gnupg \
5453 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 \
5758 php${PHP_VERSION} \
59+ php${PHP_VERSION}-amqp \
5860 php${PHP_VERSION}-bcmath \
5961 php${PHP_VERSION}-bz2 \
6062 php${PHP_VERSION}-cli \
@@ -77,8 +79,10 @@ RUN apt-get update && \
7779 php${PHP_VERSION}-soap \
7880 php${PHP_VERSION}-tidy \
7981 php${PHP_VERSION}-xml \
80- php${PHP_VERSION}-zip \
81- && rm -rf /var/lib/apt/lists/*
82+ php${PHP_VERSION}-zip
83+
84+ # Confirm NodeJS & NPM are installed
85+ RUN node -v && npm -v
8286
8387COPY ./.git /hypernode/.git
8488COPY ./bin /hypernode/bin
@@ -127,6 +131,9 @@ RUN rm -rvf \
127131 /var/lib/apt/lists/* \
128132 && apt-get autoremove -y
129133
134+ # Allow hypernode-deploy to be ran in ordinary git repository locations
135+ RUN git config --global --add safe.directory "*"
136+
130137# Setup default command
131138CMD ["hypernode-deploy" ]
132139
0 commit comments