content: # This base.Dockerfile uses separate build arguments instead of VARIANT
  ARG TARGET_JAVA_VERSION=11
  ARG BASE_IMAGE_VERSION_CODENAME=bullseye
  FROM mcr.microsoft.com/vscode/devcontainers/base:${BASE_IMAGE_VERSION_CODENAME}
  
  ARG TARGET_JAVA_VERSION
  ENV JAVA_HOME /usr/lib/jvm/msopenjdk-${TARGET_JAVA_VERSION}
  ENV PATH "${JAVA_HOME}/bin:${PATH}"
  # Default to UTF-8 file.encoding
  ENV LANG en_US.UTF-8
  
  # Install Microsoft OpenJDK
  RUN arch="$(dpkg --print-architecture)" \
  	&& case "$arch" in \
  		"amd64") \
  			jdkUrl="https://aka.ms/download-jdk/microsoft-jdk-${TARGET_JAVA_VERSION}-linux-x64.tar.gz"; \
  			;; \
  		"arm64") \
  			jdkUrl="https://aka.ms/download-jdk/microsoft-jdk-${TARGET_JAVA_VERSION}-linux-aarch64.tar.gz"; \
  			;; \
  		*) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; \
  	esac \
  	\
  	&& wget --progress=dot:giga -O msopenjdk.tar.gz "${jdkUrl}" \
  	&& wget --progress=dot:giga -O sha256sum.txt "${jdkUrl}.sha256sum.txt" \
  	\
  	&& sha256sumText=$(cat sha256sum.txt) \
  	&& sha256=$(expr substr "${sha256sumText}" 1 64) \
  	&& echo "${sha256} msopenjdk.tar.gz" | sha256sum --strict --check - \
  	&& rm sha256sum.txt* \
  	\
  	&& mkdir -p "$JAVA_HOME" \
  	&& tar --extract \
  		--file msopenjdk.tar.gz \
  		--directory "$JAVA_HOME" \
  		--strip-components 1 \
  		--no-same-owner \
  	&& rm msopenjdk.tar.gz* \
  	\
  	&& ln -s ${JAVA_HOME} /docker-java-home \
  	&& ln -s ${JAVA_HOME} /usr/local/openjdk-${TARGET_JAVA_VERSION}
  
  # Copy library scripts to execute
  COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/
  
  ARG USERNAME=vscode
  # [Option] Install Maven
  ARG INSTALL_MAVEN="false"
  ARG MAVEN_VERSION=""
  # [Option] Install Gradle
  ARG INSTALL_GRADLE="false"
  ARG GRADLE_VERSION=""
  ENV SDKMAN_DIR="/usr/local/sdkman"
  ENV PATH="${SDKMAN_DIR}/candidates/java/current/bin:${PATH}:${SDKMAN_DIR}/candidates/maven/current/bin:${SDKMAN_DIR}/candidates/gradle/current/bin"
  RUN bash /tmp/library-scripts/java-debian.sh "none" "${SDKMAN_DIR}" "${USERNAME}" "true" \
  	&& if [ "${INSTALL_MAVEN}" = "true" ]; then bash /tmp/library-scripts/maven-debian.sh "${MAVEN_VERSION:-latest}" "${SDKMAN_DIR}" ${USERNAME} "true"; fi \
  	&& if [ "${INSTALL_GRADLE}" = "true" ]; then bash /tmp/library-scripts/gradle-debian.sh "${GRADLE_VERSION:-latest}" "${SDKMAN_DIR}" ${USERNAME} "true"; fi \
  	&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
  
  # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
  ARG NODE_VERSION="none"
  ENV NVM_DIR=/usr/local/share/nvm
  ENV NVM_SYMLINK_CURRENT=true \
  	PATH="${NVM_DIR}/current/bin:${PATH}"
  RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}" \
  	&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
  
  # Remove library scripts for final image
  RUN rm -rf /tmp/library-scripts
  
  # [Optional] Uncomment this section to install additional OS packages.
  # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
  #     && apt-get -y install --no-install-recommends <your-package-list-here>
  