Skip to content

Commit fc61342

Browse files
authored
fix python sdk version (#5039)
The base image is not setting the python3.11 and the CLOUD_SDK version because it's doing it by using `export` in a RUN command and not using the `ENV`. It fix it by moving the CLOUD_SDK to ENV. <img width="1096" height="384" alt="image" src="https://github.com/user-attachments/assets/af7d309b-268c-4aaa-9f67-cebd44ee1492" /> --------- Signed-off-by: Javan Lacerda <[email protected]>
1 parent fd19c37 commit fc61342

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

docker/base/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ RUN ln -s /usr/local/bin/python3.11 /usr/bin/python3.11
128128
COPY setup_19.x /data
129129
RUN bash setup_19.x && apt-get update -y && apt-get install -y nodejs
130130

131-
RUN export CLOUDSDK_PYTHON=python3.11 && \
132-
echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
131+
ENV CLOUDSDK_PYTHON=python3.11
132+
133+
RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
133134
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
134135
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
135136
| apt-key add - && \

docker/base/ubuntu-20-04.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ RUN ln -s /usr/local/bin/python3.11 /usr/bin/python3.11
128128
COPY setup_19.x /data
129129
RUN bash setup_19.x && apt-get update -y && apt-get install -y nodejs
130130

131-
RUN export CLOUDSDK_PYTHON=python3.11 && \
132-
echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
131+
ENV CLOUDSDK_PYTHON=python3.11
132+
133+
RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
133134
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
134135
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
135136
| apt-key add - && \

docker/base/ubuntu-24-04.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ RUN cd /tmp && \
110110
rm node.tar.xz
111111
ENV PATH="/usr/local/node/bin:${PATH}"
112112

113-
RUN export CLOUDSDK_PYTHON=python3.11 && \
114-
echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
113+
ENV CLOUDSDK_PYTHON=python3.11
114+
115+
RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk main" \
115116
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
116117
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
117118
| apt-key add - && \

0 commit comments

Comments
 (0)