30 lines
673 B
Plaintext
30 lines
673 B
Plaintext
FROM python:3.9
|
|
|
|
# 内网代理(如可直接连接外网,这三行可注释)
|
|
ENV http_proxy=http://172.20.32.253:3128
|
|
ENV https_proxy=http://172.20.32.253:3128
|
|
ENV no_proxy=localhost,127.0.0.1,172.20.32.0/24
|
|
|
|
#设置时区
|
|
RUN echo "Asia/Shanghai" > /etc/timezone
|
|
|
|
RUN apt-get update
|
|
|
|
# 安装git
|
|
RUN apt-get install -y git
|
|
|
|
# 克隆代码
|
|
RUN git clone --recurse-submodules https://gitlink.org.cn/kytest/apiautotest.git
|
|
|
|
# 设置工作目录
|
|
WORKDIR /apiautotest
|
|
COPY . .
|
|
|
|
# 安装pipenv
|
|
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv
|
|
|
|
# 安装依赖
|
|
RUN pipenv install
|
|
|
|
# 运行
|
|
CMD ["pipenv", "run", "python", "run.py","-env", "hty", "-c", "login"] |