Browse Source

fix error

liuyuqi-dellpc 2 years ago
parent
commit
e806282db7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      android-studio/.devcontainer/Dockerfile

+ 3 - 2
android-studio/.devcontainer/Dockerfile

@@ -16,10 +16,11 @@ RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/
 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
 ARG NODE_VERSION="lts/*"
 
+USER vscode
 ENV ANDROID_HOME=/home/vscode/androidsdk \
     FLUTTER_VERSION=2.2.3-stable
 
-RUN  wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \
+RUN cd /home/vscode &&  wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \
     && mkdir -p $ANDROID_HOME/cmdline-tools/latest \
     && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \
     && rm -f commandlinetools-linux-*.zip \
@@ -34,4 +35,4 @@ RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "pl
 RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;google_apis;x86_64"
 RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-30;google_apis;x86_64"
 
-RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
+# RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi