docker-compose 模板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
661 B

3 years ago
FROM python:3.7-alpine
COPY ./xxx /xxx
WORKDIR /xxx
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.cloud.tencent.com/g' /etc/apk/repositories \
&& apk add tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' >/etc/timezone \
&& pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple \
&& apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev \
&& apk add --no-cache libxslt \
&& python -m pip install --upgrade pip \
&& pip install -r requirements.txt \
&& apk del .build-deps tzdata
VOLUME ["/xxx"]
CMD ["python","-u","main.py","timing"]