Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker部署怎么总是提示错误?呢 #252

Open
Dawson0x00 opened this issue Jul 8, 2020 · 2 comments
Open

docker部署怎么总是提示错误?呢 #252

Dawson0x00 opened this issue Jul 8, 2020 · 2 comments

Comments

@Dawson0x00
Copy link

  • pip install -r /opt/xunfeng/requirements.txt
    Could not open requirements file: [Errno 2] No such file or directory: '/opt/xunfeng/requirements.txt'
    Storing debug log for failure in /root/.pip/pip.log
    The command '/bin/sh -c set -x && pip install -r /op

不知道怎么解决,尝试了好多次了

@o7966
Copy link

o7966 commented Aug 6, 2020

我更改了"Dockerfile"文件,你可以对照更改就集中在前面几行。你可以试试或许可以解决你的问题,改完直接sudo docker build -t xunfeng:20200807 .

FROM ubuntu:16.04    # 此处使用ubuntu1604
MAINTAINER Medici.Yan@Gmail.com
ENV LC_ALL C.UTF-8
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# apt and pip mirrors

COPY ./sources.list /etc/apt/sources.list   # 自己在xunfeng目录里创建一个sources.list然后复制阿里的源进去
RUN mkdir -p ~/.pip \
&& echo "[global]" > ~/.pip/pip.conf \
&& echo "timeout=60" >> ~/.pip/pip.conf \
&& echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple" >> ~/.pip/pip.conf

# RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \

@Dawson0x00
Copy link
Author

好的,解决了 谢谢~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants