Skip to content

Commit 156837f

Browse files
committed
Install yarn via npm to fix NodeSource Node 22 conflict with Debian yarnpkg
1 parent 9ef2a43 commit 156837f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ RUN apt update && \
1414
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
1515
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
1616
apt update && \
17-
apt install -y --no-install-recommends nodejs yarnpkg && \
18-
apt clean -y && rm -rf /var/lib/apt/lists/*
17+
apt install -y --no-install-recommends nodejs && \
18+
apt clean -y && rm -rf /var/lib/apt/lists/* && \
19+
npm install -g yarn
1920

2021
# prepare build dir
2122
RUN mkdir /app
@@ -36,7 +37,7 @@ RUN mix deps.compile
3637

3738
# build assets
3839
COPY assets assets
39-
RUN cd assets && yarnpkg install && yarnpkg run webpack --mode production
40+
RUN cd assets && yarn install && yarn run webpack --mode production
4041
RUN mix phx.digest
4142

4243
# build project

0 commit comments

Comments
 (0)