一个简单的dockerfile范例

一个简单的dockerfile范例:

FROM alpine:latest
ADD business_sms.tar /opt/
WORKDIR /opt/business_sms/business_sms
RUN sed -i 's/http:\/\/dl-cdn.alpinelinux.org/https:\/\/mirror.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
    && apk add --no-cache -U tzdata \
    && cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && apk del tzdata \
    && apk add --no-cache python3 \
    && pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple \
    && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r ../requirements.txt
CMD ["/usr/bin/python3","/opt/business_sms/business_sms/main.py"]

You may also like...

发表评论