From a57f3554ef2da2cb62073fee527c639f428d67e2 Mon Sep 17 00:00:00 2001 From: didayolo Date: Tue, 9 Jul 2024 18:05:18 +0200 Subject: [PATCH 1/2] Change base image for Dockerfile.flower --- Dockerfile | 2 +- Dockerfile.flower | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76d12dce6..85d5dfa61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9 +FROM --platform=linux/amd64 python:3.9 RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.flower b/Dockerfile.flower index b7722e5e7..63ae781cb 100644 --- a/Dockerfile.flower +++ b/Dockerfile.flower @@ -1,8 +1,12 @@ -FROM python:3.9-alpine +FROM --platform=linux/amd64 python:3.9 + +# PYTHONUNBUFFERED: Force stdin, stdout and stderr to be totally unbuffered. (equivalent to `python -u`) +# PYTHONHASHSEED: Enable hash randomization (equivalent to `python -R`) +# PYTHONDONTWRITEBYTECODE: Do not write byte files to disk, since we maintain it as readonly. (equivalent to `python -B`) +ENV PYTHONUNBUFFERED=1 PYTHONHASHSEED=random PYTHONDONTWRITEBYTECODE=1 # Get latest root certificates -RUN apk add --no-cache ca-certificates && update-ca-certificates curl -RUN apk add curl +RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates # # Install the required packages RUN curl -sSL https://install.python-poetry.org | python3 - @@ -18,13 +22,6 @@ RUN poetry add redis=3.0.1 RUN poetry add flower=0.9.3 RUN poetry add celery="<5.0.0" -# PYTHONUNBUFFERED: Force stdin, stdout and stderr to be totally unbuffered. (equivalent to `python -u`) -# PYTHONHASHSEED: Enable hash randomization (equivalent to `python -R`) -# PYTHONDONTWRITEBYTECODE: Do not write byte files to disk, since we maintain it as readonly. (equivalent to `python -B`) - - -ENV PYTHONUNBUFFERED=1 PYTHONHASHSEED=random PYTHONDONTWRITEBYTECODE=1 - # Default port EXPOSE 5555 From abba2b988bc5ffa7fb89b0082a0d19cd419f8100 Mon Sep 17 00:00:00 2001 From: didayolo Date: Wed, 10 Jul 2024 16:02:58 +0200 Subject: [PATCH 2/2] Remove platform argument --- Dockerfile | 2 +- Dockerfile.flower | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 85d5dfa61..76d12dce6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 python:3.9 +FROM python:3.9 RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.flower b/Dockerfile.flower index 63ae781cb..59e84d6ed 100644 --- a/Dockerfile.flower +++ b/Dockerfile.flower @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 python:3.9 +FROM python:3.9 # PYTHONUNBUFFERED: Force stdin, stdout and stderr to be totally unbuffered. (equivalent to `python -u`) # PYTHONHASHSEED: Enable hash randomization (equivalent to `python -R`)