Install gcloud in devcontainer (#4454)
This commit is contained in:
Родитель
85aa6e2b01
Коммит
ce0299420c
|
@ -18,4 +18,18 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|||
# Convenience tools
|
||||
bash-completion
|
||||
|
||||
# Install gcloud
|
||||
ENV CLOUD_SDK_VERSION=497.0.0
|
||||
# Install gcloud similarly to how it is done in cloud-sdk-docker
|
||||
# https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/debian_component_based/Dockerfile
|
||||
RUN if [ `uname -m` = 'x86_64' ]; then echo -n "x86_64" > /tmp/arch; else echo -n "arm" > /tmp/arch; fi;
|
||||
RUN ARCH=`cat /tmp/arch` && curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz && \
|
||||
tar xzf google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz && \
|
||||
rm google-cloud-cli-${CLOUD_SDK_VERSION}-linux-${ARCH}.tar.gz
|
||||
RUN echo -n "beta" > /tmp/additional_components
|
||||
RUN /google-cloud-sdk/install.sh --usage-reporting=false \
|
||||
--additional-components `cat /tmp/additional_components` && rm -rf /google-cloud-sdk/.install/.backup
|
||||
|
||||
RUN su vscode -c "echo 'PATH=${PATH}:/google-cloud-sdk/bin' >> ~/.bashrc"
|
||||
|
||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g gulp-cli" 2>&1
|
||||
|
|
Загрузка…
Ссылка в новой задаче