File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,10 +143,13 @@ RUN uv tool install --verbose pre-commit && \
143143 uv tool install --verbose thefuck && \
144144 uv tool install --verbose ansible
145145
146- # npm installs
147- RUN npm install -g \
146+ # npm installs (user-local prefix to avoid root)
147+ RUN mkdir -p "$HOME/.npm-global" && \
148+ npm config set prefix "$HOME/.npm-global" && \
149+ npm install -g \
148150 prettier \
149151 pyright
152+ ENV PATH="$HOME/.npm-global/bin:$PATH"
150153
151154# Install tfenv
152155RUN git clone --depth=1 https://github.com/tfutils/tfenv.git $HOME/.tfenv
@@ -174,11 +177,11 @@ RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM
174177# REF: https://github.com/eth-p/bat-extras/issues/126
175178RUN git clone https://github.com/eth-p/bat-extras.git \
176179 && cd bat-extras \
177- && ./build.sh --install --no-verify
180+ && ./build.sh --install --prefix= "$HOME/.local" -- no-verify
178181
179182# Copies
180183ENV SHELL_DIR=$HOME/shell
181- COPY . $SHELL_DIR
184+ COPY --chown=${USERNAME}:${USERNAME} . $SHELL_DIR
182185RUN set -e \
183186 && cd $SHELL_DIR \
184187 && if [ -z "$(git status --porcelain)" ]; then echo "No changes" ; else git status --porcelain; exit 1; fi
You can’t perform that action at this time.
0 commit comments