Skip to content

Commit f5af98b

Browse files
authored
Fix website workflows (#37421)
* Install yarn via corepack * Add corepack home dir
1 parent d090aab commit f5af98b

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

website/Dockerfile

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,17 @@ RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - \
5151
nodejs \
5252
&& apt-get autoremove -yqq --purge \
5353
&& apt-get clean \
54-
&& rm -rf /var/lib/apt/lists/*
54+
&& rm -rf /var/lib/apt/lists/*
5555

5656
RUN npm update -g npm
57-
58-
RUN npm install postcss postcss-cli autoprefixer
57+
58+
RUN npm install postcss postcss-cli autoprefixer
5959

6060
# Install yarn
61-
RUN set -eux; \
62-
apt-get update; \
63-
apt-get install -y --no-install-recommends curl gnupg ca-certificates; \
64-
mkdir -p /etc/apt/keyrings; \
65-
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg \
66-
| gpg --dearmor -o /etc/apt/keyrings/yarn.gpg; \
67-
echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main" \
68-
> /etc/apt/sources.list.d/yarn.list; \
69-
apt-get update; \
70-
apt-get install -y --no-install-recommends yarn; \
71-
apt-get clean; \
72-
rm -rf /var/lib/apt/lists/*
61+
ENV COREPACK_HOME=/usr/local/share/corepack
62+
RUN mkdir -p "$COREPACK_HOME" \
63+
&& corepack enable \
64+
&& corepack prepare yarn@1.22.22 --activate
7365

7466
# Install hugo extended version v0.117.0
7567
RUN HUGOHOME="$(mktemp -d)" \

0 commit comments

Comments
 (0)