mirror of
https://github.com/Balshgit/different
synced 2025-12-12 23:00:38 +03:00
celery log example with different settings
This commit is contained in:
45
celery_log_docker/Dockerfile
Normal file
45
celery_log_docker/Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
FROM python:3.8.9-slim-buster
|
||||
|
||||
ENV BUILD_ONLY_PACKAGES='wget' \
|
||||
# python:
|
||||
PYTHONFAULTHANDLER=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONHASHSEED=random \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
# pip:
|
||||
PIP_NO_CACHE_DIR=off \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
# poetry:
|
||||
POETRY_VERSION=1.1.4 \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
POETRY_VIRTUALENVS_CREATE=false \
|
||||
POETRY_CACHE_DIR='/var/cache/pypoetry' \
|
||||
PATH="$PATH:/root/.poetry/bin"
|
||||
|
||||
# System deps:
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
bash \
|
||||
build-essential \
|
||||
gettext \
|
||||
libpq-dev \
|
||||
nano \
|
||||
curl \
|
||||
# Defining build-time-only dependencies:
|
||||
$BUILD_ONLY_PACKAGES \
|
||||
&& curl -sSL 'https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py' | python \
|
||||
&& poetry --version \
|
||||
# Removing build-time-only dependencies:
|
||||
&& apt-get remove -y $BUILD_ONLY_PACKAGES \
|
||||
# Cleaning cache:
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* \
|
||||
&& rm -rf $POETRY_CACHE_DIR
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
# Copy only requirements, to cache them in docker layer
|
||||
COPY ./poetry.lock ./pyproject.toml /code/
|
||||
RUN poetry install
|
||||
COPY . /code
|
||||
Reference in New Issue
Block a user