Skip to content

Commit 20bcb89

Browse files
committed
Use this entrypoint hack the AI told me about
1 parent d291d49 commit 20bcb89

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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
152155
RUN 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
175178
RUN 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
180183
ENV SHELL_DIR=$HOME/shell
181-
COPY . $SHELL_DIR
184+
COPY --chown=${USERNAME}:${USERNAME} . $SHELL_DIR
182185
RUN set -e \
183186
&& cd $SHELL_DIR \
184187
&& if [ -z "$(git status --porcelain)" ]; then echo "No changes"; else git status --porcelain; exit 1; fi

0 commit comments

Comments
 (0)