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"]