Skip to content

Commit

Permalink
Updating Devcontainer Dockerfile so the vscode user can run bootstrap (
Browse files Browse the repository at this point in the history
…elastic#193224)

## Summary

There was a permissions issue running bootstrap in the devContainer on
Mac.
  • Loading branch information
kc13greiner committed Sep 18, 2024
1 parent e5299a5 commit 2897f6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .devcontainer/.env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# /bin/bash or /bin/zsh (oh-my-zsh is installed by default as well)
SHELL=/bin/bash
# Switch to 1 to enable FIPS environment, any other value to disable
# Switch to 1 to enable FIPS environment, any other value to disable,
# then close and reopen a new terminal to setup the environment
FIPS=0
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ WORKDIR ${KBN_DIR}

# Node and NVM setup
COPY .node-version /tmp/

USER vscode

RUN mkdir -p $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash && \
. "$NVM_DIR/nvm.sh" && \
Expand All @@ -61,6 +64,8 @@ RUN mkdir -p $NVM_DIR && \
echo "source $NVM_DIR/nvm.sh" >> ${HOME}/.zshrc && \
chown -R 1000:1000 "${HOME}/.npm"

USER root

# Reload the env everytime a new shell is opened incase the .env file changed.
RUN echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \
echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc
Expand Down

0 comments on commit 2897f6d

Please sign in to comment.