From e2bc878c3182e8ce71aeb0203c736128ba2da4f0 Mon Sep 17 00:00:00 2001 From: TheRealDanii <58031079+TheRealDanii@users.noreply.github.com> Date: Wed, 4 Nov 2026 13:27:54 +0100 Subject: [PATCH 1/2] fix(memorystore): update redis GKE Dockerfile and App Engine runtime to supported Python --- .../redis/gae_standard_deployment/app.yaml | 2 +- memorystore/redis/gke_deployment/Dockerfile | 28 ++++++------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/memorystore/redis/gae_standard_deployment/app.yaml b/memorystore/redis/gae_standard_deployment/app.yaml index 644e28c54e5..2fcd3cf7de6 100644 --- a/memorystore/redis/gae_standard_deployment/app.yaml +++ b/memorystore/redis/gae_standard_deployment/app.yaml @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # [START memorystore_app_yaml_standard] -runtime: python37 +runtime: python313 entrypoint: gunicorn -b :$PORT main:app # Update with Redis instance details diff --git a/memorystore/redis/gke_deployment/Dockerfile b/memorystore/redis/gke_deployment/Dockerfile index 94ccd7d9766..81eb6dbe254 100644 --- a/memorystore/redis/gke_deployment/Dockerfile +++ b/memorystore/redis/gke_deployment/Dockerfile @@ -12,33 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -# The Google App Engine python runtime is Debian Jessie with Python installed -# and various os-level packages to allow installation of popular Python -# libraries. The source is on github at: -# https://github.com/GoogleCloudPlatform/python-docker -FROM gcr.io/google_appengine/python - -# Create a virtualenv for the application dependencies. -# If you want to use Python 2, add the -p python2.7 flag. -RUN virtualenv -p python3.4 /env - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. This ensures the application is executed within -# the context of the virtualenv and will have access to its dependencies. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH +# Use the official lightweight Python image. +# https://hub.docker.com/_/python +FROM python:3.14-slim # Note: REDISHOST value here is only used for local testing # See README.md on how to inject environment variable as ConfigMap on GKE ENV REDISHOST 127.0.0.1 ENV REDISPORT 6379 +ENV APP_HOME /app +WORKDIR $APP_HOME + # Install dependencies. -ADD requirements.txt /app/requirements.txt -RUN pip install -r /app/requirements.txt +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt # Add application code. -ADD . /app +COPY . ./ CMD ["gunicorn", "-b", "0.0.0.0:8080", "main:app"] - From 5ef5c84005ce4256e6c07322e2049052e451449f Mon Sep 17 00:00:00 2001 From: TheRealDanii <58031079+TheRealDanii@users.noreply.github.com> Date: Wed, 4 Nov 2026 13:49:04 +0100 Subject: [PATCH 2/2] fix(memorystore): use python314 App Engine runtime --- memorystore/redis/gae_standard_deployment/app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memorystore/redis/gae_standard_deployment/app.yaml b/memorystore/redis/gae_standard_deployment/app.yaml index 2fcd3cf7de6..56c1fbfe582 100644 --- a/memorystore/redis/gae_standard_deployment/app.yaml +++ b/memorystore/redis/gae_standard_deployment/app.yaml @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # [START memorystore_app_yaml_standard] -runtime: python313 +runtime: python314 entrypoint: gunicorn -b :$PORT main:app # Update with Redis instance details