diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..80f3e4a1c5 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,25 @@ +# Use a base image with Ubuntu +FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu + +# Install Java 8, curl, and Python (required for Google Cloud SDK) +RUN apt-get update && \ + apt-get install -y openjdk-8-jdk curl python3 python3-pip && \ + apt-get clean; + +# Set JAVA_HOME for Java 8 +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 +ENV PATH $JAVA_HOME/bin:$PATH + +# Install Google Cloud SDK +RUN curl -sSL https://sdk.cloud.google.com | bash && \ + /root/google-cloud-sdk/install.sh && \ + /root/google-cloud-sdk/bin/gcloud components install beta + +# Add gcloud to PATH +ENV PATH $PATH:/root/google-cloud-sdk/bin + +# Optional: Verify installations +RUN java -version && gcloud --version + +# Set default shell to bash +SHELL ["/bin/bash", "-c"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..597ac4f9c1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "Java 8 and Google Cloud SDK", + "build": { + "dockerfile": "Dockerfile" + }, + "settings": { + "java.home": "/usr/lib/jvm/java-8-openjdk-amd64" + }, + "extensions": [ + "vscjava.vscode-java-pack", // Java support + "ms-azuretools.vscode-docker" // Docker support + ], + "postCreateCommand": "gcloud --version" // Verifies gcloud is installed + } + \ No newline at end of file