Align root/vscode user dynamic for codespaces with non-codespaces config (#30593)

pull/2732/head^2
Matt Jankowski 2024-06-07 09:55:55 -04:00 committed by GitHub
parent 773283ffb9
commit 4f6cc547d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ FROM mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm
# RUN gem install rails webdrivers
ARG NODE_VERSION="20"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
RUN . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1
# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
@ -15,6 +15,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
RUN gem install foreman
# [Optional] Uncomment this line to install global node packages.
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && corepack enable" 2>&1
RUN . /usr/local/share/nvm/nvm.sh && corepack enable 2>&1
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

View File

@ -23,6 +23,8 @@
}
},
"remoteUser": "root",
"otherPortsAttributes": {
"onAutoForward": "silent"
},