Skip to content

Commit

Permalink
fix: update dev container
Browse files Browse the repository at this point in the history
- Ship new NPM version.
- Make trusting the git repo part of the profile startup.
  • Loading branch information
KeesCBakker committed Dec 11, 2024
1 parent a94617d commit 55b2c3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# trust the repo
# fixes:
# - fatal: detected dubious ownership in repository at '/workspaces/bot-zero'.
git config --global --add safe.directory "$PWD"
9 changes: 8 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye

# Install the npm packages globally
RUN npm install -g npm@10.7.0 \
RUN npm install -g npm@10.9.2 \
&& npm install -g npm-check-updates

COPY ./startup.sh /
RUN chmod +x /startup.sh

# Append the profile to the current .bashrc and .zshrc files
# this makes sure we keep the current behavior like colors and aliases
COPY ./.profile /tmp/.profile
RUN cat /tmp/.profile >> /home/node/.bashrc && \
cat /tmp/.profile >> /home/node/.zshrc && \
rm /tmp/.profile
5 changes: 0 additions & 5 deletions .devcontainer/startup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/sh

# trust the repo
# fixes:
# - fatal: detected dubious ownership in repository at '/workspaces/bot-zero'.
git config --global --add safe.directory "$PWD"

# install NPM packages
echo ""
echo "Installing packages..."
Expand Down

0 comments on commit 55b2c3f

Please sign in to comment.