-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathDockerfile.flower
31 lines (23 loc) · 1.07 KB
/
Dockerfile.flower
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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`)
# 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 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 - --version 1.8.3
# Poetry location so future commands (below) work
ENV PATH $PATH:/root/.local/bin
# Want poetry to use system python of docker container
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project false
RUN poetry init --no-interaction
RUN poetry add redis=3.0.1
RUN poetry add flower=0.9.3
RUN poetry add celery="<5.0.0"
# Default port
EXPOSE 5555
# Run as a non-root user by default, run as user with least privileges.
USER nobody
ENTRYPOINT ["flower"]