-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote-Containers: Installing VSCode server fails if non-root user exists in dockerfile #174
Comments
@nphmuller does reloading the Window (Command Developer: Reload Window) recover from this situation? |
Nope. The situation can only be resolved by removing the non-root user from the Dockerfile. |
@nphmuller can you share your Dockerfile in this issue? |
//fyi @chrmarti |
It's basically the #-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM node:lts
# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Verify git and needed tools are installed
RUN apt-get install -y git procps
# Remove outdated yarn from /opt and install via package
# so it can be easily updated via apt-get upgrade yarn
RUN rm -rf /opt/yarn-* \
rm -f /usr/local/bin/yarn \
rm -f /usr/local/bin/yarnpkg \
&& apt-get install -y curl apt-transport-https lsb-release \
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends yarn
# Install eslint
RUN npm install -g eslint
# I ADDED THIS:
USER node
|
Try adding |
Repro:
Remote-Containers: Open folder in container...
commandNode.js (latest LTS)
USER node
at end of dockerfileRemote-Containers: Rebuild Container
command.An error occurred setting up the container.
Error output from CLI:
The text was updated successfully, but these errors were encountered: