mirror of
https://github.com/xingsu1021/pthelper.git
synced 2026-06-18 09:47:01 +08:00
30 lines
892 B
Docker
30 lines
892 B
Docker
# pull official base image
|
|
FROM a76yyyy/ddddocr:latest
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# create the appropriate directories
|
|
ENV APP_HOME=/home/data/www
|
|
RUN mkdir -p $APP_HOME
|
|
WORKDIR $APP_HOME
|
|
|
|
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
|
|
|
RUN git clone https://github.com/xingsu1021/pthelper.git ${APP_HOME}
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple/ && \
|
|
cp -ra start.sh /usr/local/bin/start.sh && \
|
|
chmod +x /usr/local/bin/start.sh && \
|
|
ln -s /home/data/www/db /db && \
|
|
ln -s /home/data/www/logs /logs && \
|
|
ln -s /home/data/www/backups /backups
|
|
|
|
EXPOSE 80
|
|
#apt-get安装路径
|
|
#CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
|
#pip安装路径
|
|
#CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
|
|
|
CMD ["/usr/local/bin/start.sh"] |