Skip to content

Commit 21d4d6b

Browse files
authored
fix: update libraries and python for the base image (#570)
* fix: update libraries and python for the base image * fix:update python to python3 * fix: removing the python installation and using what's already installed * fix: resolve error around the use of apt instead of apt-get
1 parent 8be59fc commit 21d4d6b

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

.kokoro/docker/Dockerfile

+7-20
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
FROM gcr.io/cloud-devrel-kokoro-resources/python-base:latest
1616

1717
# Install libraries needed by third-party python packages that we depend on.
18-
RUN apt update \
19-
&& apt install -y \
18+
RUN apt-get update \
19+
&& apt-get install -y \
2020
graphviz \
2121
libcurl4-openssl-dev \
2222
libffi-dev \
@@ -30,32 +30,19 @@ RUN apt update \
3030
libxml2-dev \
3131
libxslt1-dev \
3232
openssl \
33-
portaudio19-dev \
34-
python-pyaudio \
3533
zlib1g-dev \
36-
&& apt clean
34+
&& apt-get clean
3735

38-
###################### Install python 3.7.12
39-
40-
# Download python 3.7.12
41-
RUN wget https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz
42-
43-
# Extract files
44-
RUN tar -xvf Python-3.7.12.tgz
45-
46-
# Install python 3.7.12
47-
RUN ./Python-3.7.12/configure --enable-optimizations
48-
RUN make altinstall
4936

5037
###################### Check python version
5138

52-
RUN python --version
53-
RUN which python
39+
RUN python3 --version
40+
RUN which python3
5441

5542
# Setup Cloud SDK
56-
ENV CLOUD_SDK_VERSION 369.0.0
43+
ENV CLOUD_SDK_VERSION 489.0.0
5744
# Use system python for cloud sdk.
58-
ENV CLOUDSDK_PYTHON /usr/bin/python
45+
ENV CLOUDSDK_PYTHON python3.12
5946
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
6047
RUN tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
6148
RUN /google-cloud-sdk/install.sh

0 commit comments

Comments
 (0)