Skip to content
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

add docker file #3229

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use a base image with Ubuntu
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to use this container versus the official Ubuntu image?


# 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 && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting in October we will no longer be deploying with Java 8. This should be changed to Java 11.

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"]
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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
}