Skip to content

Instantly share code, notes, and snippets.

@Loddan
Created February 22, 2018 15:16
Show Gist options
  • Save Loddan/d7a549708b5484687c7657fc1b55a0b5 to your computer and use it in GitHub Desktop.
Save Loddan/d7a549708b5484687c7657fc1b55a0b5 to your computer and use it in GitHub Desktop.
cloud-app-engine-java dockerfile
FROM openjdk:8-jdk-slim
ARG CLOUD_SDK_VERSION=189.0.0
ARG INSTALL_COMPONENTS="app-engine-java"
ARG HOME=/root
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
RUN cd $HOME && \
apt-get update && \
apt-get install -y -qq --no-install-recommends curl python && apt-get clean && \
curl -sL -o google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz && \
tar -xzvf google-cloud-sdk.tar.gz && \
rm google-cloud-sdk.tar.gz && \
google-cloud-sdk/install.sh --usage-reporting=false --path-update=true --bash-completion=true --rc-path="$HOME/.bashrc" --additional-components $INSTALL_COMPONENTS && \
google-cloud-sdk/bin/gcloud config set --installation component_manager/disable_update_check true && \
sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' "$HOME/google-cloud-sdk/lib/googlecloudsdk/core/config.json" && \
mkdir ${HOME}/.ssh
ENV PATH $HOME/google-cloud-sdk/bin:$PATH
VOLUME ["$HOME/.config"]
CMD ["/bin/bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment