File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed
Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,32 @@ RUN apt-get update && apt-get -y install \
1313 zip \
1414 && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
1515
16- RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
17- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
18- curl -sL https://deb.nodesource.com/setup_22.x | bash - && \
19- apt-get update && apt-get install -y \
20- nodejs \
21- yarn \
22- && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
16+ RUN set -eux; \
17+ # Prepare keyrings directory
18+ mkdir -p /etc/apt/keyrings; \
19+ \
20+ # Import Yarn GPG key
21+ curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg \
22+ | tee /etc/apt/keyrings/yarn.gpg >/dev/null; \
23+ chmod 644 /etc/apt/keyrings/yarn.gpg; \
24+ \
25+ # Add Yarn repo with signed-by
26+ echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main" \
27+ | tee /etc/apt/sources.list.d/yarn.list; \
28+ \
29+ # Run NodeSource setup script (unchanged)
30+ curl -sL https://deb.nodesource.com/setup_22.x | bash -; \
31+ \
32+ # Install Node.js + Yarn
33+ apt-get update; \
34+ apt-get install -y --no-install-recommends \
35+ nodejs \
36+ yarn; \
37+ \
38+ # Cleanup
39+ apt-get -y autoremove; \
40+ apt-get clean autoclean; \
41+ rm -rf /var/lib/apt/lists/*
2342
2443
2544# Install PHP
You can’t perform that action at this time.
0 commit comments