liuyuqi-dellpc 8 months ago
parent
commit
1a7f8d18b5

+ 0 - 2
flutter/.devcontainer/3.13.5/devcontainer.json

@@ -17,7 +17,6 @@
 	// 	}
 	// },
 
-	// Set *default* container specific settings.json values on container create.
 	"settings": {
 		"java.home": "/docker-java-home",
 		"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
@@ -28,7 +27,6 @@
 		}]
 	},
 	
-	// Add the IDs of extensions you want installed when the container is created.
 	"extensions": [
 		"dart-code.dart-code",
 		"dart-code.flutter"

+ 1 - 0
flutter/.devcontainer/3.7.7/Dockerfile

@@ -22,6 +22,7 @@ RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/
 
 USER vscode
 WORKDIR /home/vscode
+# ARG FLUTTER_VERSION="2.10.5"
 ARG FLUTTER_VERSION="3.7.7"
 ENV ANDROID_HOME=/home/vscode/androidsdk \
     FLUTTER_HOME=/home/vscode/flutter

+ 1 - 2
flutter/.devcontainer/3.7.7/devcontainer.json

@@ -5,7 +5,6 @@
 	"name": "Java 16",
 	"image": "jianboy/flutter-dev-container:3.13.5",
 
-	// Set *default* container specific settings.json values on container create.
 	"settings": {
 		"java.home": "/docker-java-home",
 		"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
@@ -16,8 +15,8 @@
 		}]
 	},
 	
-	// Add the IDs of extensions you want installed when the container is created.
 	"extensions": [
+		// "vscjava.vscode-java-pack",
 		"dart-code.dart-code",
 		"dart-code.flutter"
 	],

+ 0 - 52
flutter/.devcontainer/Dockerfile-2.10.5

@@ -1,52 +0,0 @@
-# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8/.devcontainer/base.Dockerfile
-
-# [Choice] Java version: 11, 16
-ARG VARIANT="16"
-FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
-
-# [Option] Install Maven
-ARG INSTALL_MAVEN="false"
-ARG MAVEN_VERSION=""
-ARG INSTALL_JAVA="true"
-# [Option] Install Gradle
-ARG INSTALL_GRADLE="false"
-ARG GRADLE_VERSION="7.2.2"
-# ARG JAVA_VERSION="11.0.12.hs-adpt"
-ARG JAVA_VERSION="8.0.372-tem"
-RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
-    && if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
-# install Java
-
-RUN if ["${INSTALL_JAVA}" = "true"]; then su  vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install java \"${JAVA_VERSION}\""; fi
-
-USER vscode
-WORKDIR /home/vscode
-ARG FLUTTER_VERSION="2.10.5"
-ENV ANDROID_HOME=/home/vscode/androidsdk \
-    FLUTTER_HOME=/home/vscode/flutter
-
-RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip \
-    && mkdir -p $ANDROID_HOME/cmdline-tools/latest \
-    && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \
-    && rm -f commandlinetools-linux-*.zip \
-    && mv $ANDROID_HOME/cmdline-tools/bin $ANDROID_HOME/cmdline-tools/latest \
-    && mv $ANDROID_HOME/cmdline-tools/lib $ANDROID_HOME/cmdline-tools/latest
-
-RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/vscode/.bashrc \
-    && echo 'export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH' >> /home/vscode/.bashrc
-
-ENV PATH=$PATH:$FLUTTER_HOME/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/emulator
-# Install Android Image version 30
-RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33"
-# 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"
-
-# Install flutter
-RUN git clone --branch ${FLUTTER_VERSION} https://github.com/flutter/flutter.git ${FLUTTER_HOME} \
-    && cd ${FLUTTER_HOME} \
-    && ./bin/flutter precache \
-    && ./bin/flutter doctor
-
-# # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
-# ARG NODE_VERSION="lts/*"
-# RUN if [ "${NODE_VERSION}" != "none" ]; then umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1; fi

+ 0 - 53
flutter/.devcontainer/Dockerfile-3.0.5

@@ -1,53 +0,0 @@
-# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8/.devcontainer/base.Dockerfile
-
-# [Choice] Java version: 11, 16
-ARG VARIANT="16"
-FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
-
-# [Option] Install Maven
-ARG INSTALL_MAVEN="false"
-ARG MAVEN_VERSION=""
-ARG INSTALL_JAVA="true"
-# [Option] Install Gradle
-ARG INSTALL_GRADLE="false"
-ARG GRADLE_VERSION="7.2.2"
-
-# ARG JAVA_VERSION="11.0.12.hs-adpt"
-ARG JAVA_VERSION="8.0.372-tem"
-RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
-    && if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
-# install Java
-
-RUN if ["${INSTALL_JAVA}" = "true"]; then su  vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install java \"${JAVA_VERSION}\""; fi
-
-USER vscode
-WORKDIR /home/vscode
-ARG FLUTTER_VERSION="3.0.5"
-ENV ANDROID_HOME=/home/vscode/androidsdk \
-    FLUTTER_HOME=/home/vscode/flutter
-
-RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip \
-    && mkdir -p $ANDROID_HOME/cmdline-tools/latest \
-    && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \
-    && rm -f commandlinetools-linux-*.zip \
-    && mv $ANDROID_HOME/cmdline-tools/bin $ANDROID_HOME/cmdline-tools/latest \
-    && mv $ANDROID_HOME/cmdline-tools/lib $ANDROID_HOME/cmdline-tools/latest
-
-RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/vscode/.bashrc \
-    && echo 'export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH' >> /home/vscode/.bashrc
-
-ENV PATH=$PATH:$FLUTTER_HOME/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/emulator
-# Install Android Image version 30
-RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33"
-# 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"
-
-# Install flutter
-RUN git clone --branch ${FLUTTER_VERSION} https://github.com/flutter/flutter.git ${FLUTTER_HOME} \
-    && cd ${FLUTTER_HOME} \
-    && ./bin/flutter precache \
-    && ./bin/flutter doctor
-
-# # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
-# ARG NODE_VERSION="lts/*"
-# RUN if [ "${NODE_VERSION}" != "none" ]; then umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1; fi

+ 0 - 54
flutter/.devcontainer/Dockerfile-3.13.5

@@ -1,54 +0,0 @@
-# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8/.devcontainer/base.Dockerfile
-
-# [Choice] Java version: 11, 16
-ARG VARIANT="16"
-FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
-# FROM mcr.microsoft.com/devcontainers/universal:2.4.0-focal
-
-# [Option] Install Maven
-ARG INSTALL_MAVEN="false"
-ARG MAVEN_VERSION=""
-ARG INSTALL_JAVA="true"
-# [Option] Install Gradle
-ARG INSTALL_GRADLE="false"
-ARG GRADLE_VERSION="7.2.2"
-
-# ARG JAVA_VERSION="11.0.12.hs-adpt"
-# ARG JAVA_VERSION="8.0.372-tem"
-RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
-    && if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
-# install Java
-
-# RUN if ["${INSTALL_JAVA}" = "true"]; then su  vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install java \"${JAVA_VERSION}\""; fi
-
-USER vscode
-WORKDIR /home/vscode
-ARG FLUTTER_VERSION="3.13.5"
-ENV ANDROID_HOME=/home/vscode/androidsdk \
-    FLUTTER_HOME=/home/vscode/flutter
-
-RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip \
-    && mkdir -p $ANDROID_HOME/cmdline-tools/latest \
-    && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \
-    && rm -f commandlinetools-linux-*.zip \
-    && mv $ANDROID_HOME/cmdline-tools/bin $ANDROID_HOME/cmdline-tools/latest \
-    && mv $ANDROID_HOME/cmdline-tools/lib $ANDROID_HOME/cmdline-tools/latest
-
-RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/vscode/.bashrc \
-    && echo 'export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH' >> /home/vscode/.bashrc
-
-ENV PATH=$PATH:$FLUTTER_HOME/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/emulator
-# Install Android Image version 30
-RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33"
-# 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"
-
-# Install flutter
-RUN git clone --branch ${FLUTTER_VERSION} https://github.com/flutter/flutter.git ${FLUTTER_HOME} \
-    && cd ${FLUTTER_HOME} \
-    && ./bin/flutter precache \
-    && ./bin/flutter doctor
-
-# # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
-# ARG NODE_VERSION="lts/*"
-# RUN if [ "${NODE_VERSION}" != "none" ]; then umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1; fi

+ 0 - 49
flutter/.devcontainer/devcontainer.json

@@ -1,49 +0,0 @@
-// java8 + android env
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
-// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8
-{
-	"name": "Java 16",
-	"image": "jianboy/flutter-dev-container:3.7.7",
-	// "build": {
-	// 	"dockerfile": "Dockerfile",
-	// 	"args": {
-	// 		// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
-	// 		// Use bullseye when running on local arm64/Apple Silicon.
-	// 		"VARIANT": "buster",
-	// 		// Options
-	// 		"INSTALL_MAVEN": "true",
-	// 		"INSTALL_GRADLE": "true",
-	// 		"NODE_VERSION": "lts/*"
-	// 	}
-	// },
-
-	// Set *default* container specific settings.json values on container create.
-	"settings": {
-		"java.home": "/docker-java-home",
-		"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
-		"java.configuration.runtimes": [{
-			"default": true,
-			"name": "JavaSE-11",
-			"path": "/usr/local/sdkman/candidates/java/current"
-		}]
-	},
-	
-	// Add the IDs of extensions you want installed when the container is created.
-	"extensions": [
-		"vscjava.vscode-java-pack",
-		"dart-code.dart-code",
-		"dart-code.flutter"
-	],
-
-	// Use 'forwardPorts' to make a list of ports inside the container available locally.
-	// "forwardPorts": [],
-
-	// Use 'postCreateCommand' to run commands after the container is created.
-	// "postCreateCommand": "java -version",
-
-	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
-	"remoteUser": "vscode",
-	"features": {
-		"docker-in-docker": "latest"
-	}
-}