Skip to content

Commit 4c60fdd

Browse files
authored
[ci-utils] Use google's apt repo to install gcloud and kubectl (#14708)
See https://cloud.google.com/sdk/docs/install#deb ### Security Assessment - [x] This change has a low security impact
1 parent 3c9691d commit 4c60fdd

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

ci/Dockerfile.ci-utils

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
ARG BASE_IMAGE={{ base_image.image }}
22
FROM $BASE_IMAGE AS base
33

4-
# source: https://cloud.google.com/storage/docs/gsutil_install#linux
5-
RUN curl --remote-name https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-447.0.0-linux-x86_64.tar.gz && \
6-
tar -xf google-cloud-sdk-447.0.0-linux-x86_64.tar.gz && \
7-
curl --remote-name https://dl.k8s.io/release/v1.21.14/bin/linux/amd64/kubectl && \
8-
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
9-
ENV PATH $PATH:/google-cloud-sdk/bin
10-
114
# https://bugs.mysql.com/bug.php?id=105288&thanks=sub
12-
RUN hail-apt-get-install xz-utils libncurses5 git && \
5+
RUN hail-apt-get-install xz-utils libncurses5 git google-cloud-cli kubectl && \
136
curl --remote-name https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.26-linux-glibc2.17-x86_64-minimal-rebuild.tar.xz && \
147
mkdir -p /opt && \
158
tar -vx -C /opt -f mysql-8.0.26-linux-glibc2.17-x86_64-minimal-rebuild.tar.xz && \

docker/hail-ubuntu/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ RUN chmod 755 /bin/retry && \
1818
chmod 755 /controller.sh && \
1919
echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \
2020
mkdir -p /usr/share/keyrings/ && \
21-
hail-apt-get-install curl gpg jq rsync && \
21+
hail-apt-get-install curl apt-transport-https ca-certificates gnupg jq rsync && \
2222
curl 'https://keyserver.ubuntu.com/pks/lookup?search=0xF23C5A6CF475977595C89F51BA6932366A755776&hash=on&exact=on&options=mr&op=get' \
2323
| gpg --dearmor > /usr/share/keyrings/deadsnakes-ppa-archive-keyring.gpg && \
2424
echo 'deb [signed-by=/usr/share/keyrings/deadsnakes-ppa-archive-keyring.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main' \
2525
>> /etc/apt/sources.list && \
2626
echo 'deb-src [signed-by=/usr/share/keyrings/deadsnakes-ppa-archive-keyring.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main' \
2727
>> /etc/apt/sources.list && \
28+
curl 'https://packages.cloud.google.com/apt/doc/apt-key.gpg' \
29+
| gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
30+
echo 'deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main' \
31+
>> /etc/apt/sources.list && \
2832
hail-apt-get-install python$PYTHON_VERSION-minimal python$PYTHON_VERSION-dev python$PYTHON_VERSION-distutils gcc g++ && \
2933
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python$PYTHON_VERSION 1 && \
3034
curl https://bootstrap.pypa.io/get-pip.py | python3 && \

0 commit comments

Comments
 (0)