-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM node:22 | ||
|
||
# Create directories | ||
RUN mkdir -p /usr/local/node/bin && \ | ||
mkdir -p /usr/local/node/lib | ||
|
||
# Install Yarn globally with force | ||
RUN npm install -g yarn --force | ||
|
||
# Copy node executable and libs | ||
RUN cp /usr/local/bin/node /usr/local/node/bin/ && \ | ||
cp -r /usr/local/lib/node_modules /usr/local/node/lib/ && \ | ||
ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/node/bin/npm && \ | ||
ln -s ../lib/node_modules/yarn/bin/yarn.js /usr/local/node/bin/yarn && \ | ||
chmod +x /usr/local/node/bin/* | ||
|
||
# Add our custom bin directory to PATH | ||
ENV PATH=/usr/local/node/bin:$PATH | ||
|
||
WORKDIR /srv/www/web | ||
|
||
# Optional check | ||
RUN node --version && npm --version && yarn --version |