CI; Update Dockerfile for grafana/grafana-ci-deploy container (#52516)

* Use python 3.7 for gcloud

* Update comment for reference

* Update image version

* Update gcloud components
This commit is contained in:
Dimitris Sotirakis
2022-07-20 13:34:09 +03:00
committed by GitHub
parent 6cab909132
commit 47678cd087
3 changed files with 42 additions and 28 deletions
+16 -2
View File
@@ -26,8 +26,21 @@ ARG DEBIAN_FRONTEND=noninteractive \
GOOGLE_SDK_VERSION=325.0.0 \
GOOGLE_SDK_CHECKSUM=374f960c9f384f88b6fc190b268ceac5dcad777301390107af63782bfb5ecbc7
# Install python 3.7, as 3.10 is not working (see https://stackoverflow.com/questions/69779995/solving-an-attribute-error-found-while-installing-or-building-on-google-cloud-pl)
RUN apt update && apt install -y build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev && \
curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz && \
tar -xf Python-3.7.3.tar.xz && \
cd Python-3.7.3 && \
./configure --enable-optimizations && \
make -j 8 && \
make altinstall && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.7 get-pip.py
ENV CLOUDSDK_PYTHON=/usr/local/bin/python3.7
# Need procps for pkill utility, which is used by the build pipeline tool to restart the GPG agent
RUN apt update && apt install -yq git curl python3-pip procps && pip3 install -U awscli crcmod && \
RUN apt update && apt install -yq git procps && pip3 install -U awscli crcmod && \
curl -fLO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GOOGLE_SDK_VERSION}-linux-x86_64.tar.gz && \
echo "${GOOGLE_SDK_CHECKSUM} google-cloud-sdk-${GOOGLE_SDK_VERSION}-linux-x86_64.tar.gz" | sha256sum --check --status && \
tar xzf google-cloud-sdk-${GOOGLE_SDK_VERSION}-linux-x86_64.tar.gz -C /opt && \
@@ -39,6 +52,7 @@ RUN apt update && apt install -yq git curl python3-pip procps && pip3 install -U
ln -s /opt/google-cloud-sdk/bin/gsutil /usr/bin/gsutil && \
ln -s /opt/google-cloud-sdk/bin/gcloud /usr/bin/gcloud && \
mkdir -p /deb-repo /rpm-repo && \
ln -s /usr/bin/createrepo_c /usr/bin/createrepo
ln -s /usr/bin/createrepo_c /usr/bin/createrepo && \
gcloud components update
COPY --from=0 /go/bin/aptly /usr/local/bin/aptly