mirror of
https://github.com/xingsu1021/pthelper.git
synced 2026-02-13 07:05:44 +08:00
38 lines
971 B
Docker
38 lines
971 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 apk --no-cache add unit unit-openrc unit-python3
|
|
|
|
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/
|
|
|
|
RUN cp start.sh /usr/local/bin/start.sh && \
|
|
chmod +x /usr/local/bin/start.sh && \
|
|
cp conf.json /var/lib/unit/conf.json
|
|
|
|
# COPY start.sh /usr/local/bin/start.sh
|
|
# RUN chmod +x /usr/local/bin/start.sh
|
|
|
|
RUN ln -s /home/data/www/db /db && \
|
|
ln -s /home/data/www/logs /logs && \
|
|
ln -s /home/data/www/backups /backups
|
|
|
|
#COPY conf.json /var/lib/unit/conf.json
|
|
|
|
EXPOSE 80
|
|
#unit管理端口
|
|
EXPOSE 60081
|
|
|
|
CMD ["/usr/local/bin/start.sh"] |