django-vue-admin/docker_env/celery/Dockerfile

17 lines
603 B
Docker
Raw Normal View History

2021-03-07 02:37:42 +00:00
FROM python:3.7
# ENV PYTHONUNBUFFERED 1
# RUN sed -i s/deb.debian.org/mirrors.163.com/g /etc/apt/sources.list
2021-03-24 17:09:30 +00:00
# RUN cat /etc/apt/sources.list
2021-03-07 02:37:42 +00:00
# RUN apt-get clean
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y python3.7-dev libpq-dev libopencv-dev python-opencv
2021-03-24 17:09:30 +00:00
RUN apt-get install -y redis-tools
2021-03-07 02:37:42 +00:00
COPY ./docker_env/celery/requirement.txt /
RUN mkdir /backend
WORKDIR /backend
RUN python3.7 -m pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /requirement.txt --use-feature=2020-resolver
2021-03-24 17:09:30 +00:00
CMD ["celery", "-A", "application", "worker", "-B", "--loglevel=info"]
2021-03-07 02:37:42 +00:00