【Docker】pyresttest的dockerfile调整,增加时区

由于pyresttest进行默认时区为GMT,在一些服务要求时间间隔不超过一定时间的服务,通过pyresttest进行测试会出现请求超时要重新登陆的情况。
根据进行调整原有进行:https://hub.docker.com/r/thoom/pyresttestdockerfile如下:

FROM python:2-alpine
LABEL Author="Z.d. Peacock >"

# This needs to be set otherwise pycurl won't link correctly
ENV PYCURL_SSL_LIBRARY=openssl

RUN apk add --no-cache --update openssl curl tzdata \
    && apk add --no-cache --update --virtual .build-deps build-base python-dev curl-dev \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && pip install jmespath jsonschema pyresttest \
    && apk del .build-deps

WORKDIR /tests

ENTRYPOINT ["pyresttest"]

增加了安装包tzdata,调整时区为东八区
可以直接执行命令拉取镜像:

docker pull weltest/pyresttest

你可能感兴趣的:(PyRestTest,Docker,Dockerfile,pyresttest,接口测试)