Skip to content

Commit

Permalink
fix: npm belongs to user 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Oct 2, 2023
1 parent 736dce4 commit 35229cd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ RUN curl -sL https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-x64.tar.xz | \
tar -C /usr/local/lib -Jxf -
ENV PATH="${PATH}:/usr/local/lib/node-v18.18.0-linux-x64/bin"

# Yarn
RUN npm i -g yarn && \
# Set env for all users
sed -i 's@PATH=.*@PATH='"${PATH}"'@g' /etc/environment
# Set environment for all users
# PATH variable has been extended where necessary previously in this file
RUN sed -i 's@PATH=.*@PATH='"${PATH}"'@g' /etc/environment

USER 1000

# Yarn
RUN npm i -g yarn

0 comments on commit 35229cd

Please sign in to comment.