You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in
from pip._internal.cli.main import main
File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 58
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip3 install pip==20.3.4' returned a non-zero code: 1
这是我部署的时候报的错,后来发现是官方dockerfile里面pip的版本问题
在修改nginx.conf 修改之前加一个 RUN pip3 install pip==20.3.4 就可以了
以下是我改之后的DockerFile
FROM ubuntu:16.04
MAINTAINER Tuuu Nya<song@secbox.cn>
# install system requirement
RUN sed -i s/archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
RUN sed -i s/security.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python3 python3-dev python3-pip nginx supervisor libmysqlclient-dev redis-server libssl-dev libffi-dev && \
rm -rf /var/lib/apt/lists/*
# RUN pip3 install --upgrade pip
# 这一行是我加的
RUN pip3 install pip==20.3.4
# setup all the configfiles
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN rm -rf /etc/nginx/sites-enabled/default
RUN sed -i '/include \/etc\/nginx\/sites-enabled\//a\\tinclude /home/docker/Github-Monitor/docker/nginx-app.conf;' /etc/nginx/nginx.conf
RUN sed -i 's/\/etc\/supervisor\/conf.d\/\*.conf/\/home\/docker\/Github-Monitor\/docker\/supervisor-app.conf/g' /etc/supervisor/supervisord.conf
# install requirement
COPY server/requirements.pip /requirement.txt
RUN pip3 install -r /requirement.txt -i http://pypi.doubanio.com/simple --trusted-host pypi.doubanio.com
# volumne
VOLUME ["/var/lib/redis"]
VOLUME ["/home/docker/Github-Monitor/"]
WORKDIR /home/docker/Github-Monitor/
ENV LANG C.UTF-8
EXPOSE 80
CMD ["/bin/bash", "/home/docker/Github-Monitor/docker/run.sh"]
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in
from pip._internal.cli.main import main
File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 58
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip3 install pip==20.3.4' returned a non-zero code: 1
这是我部署的时候报的错,后来发现是官方dockerfile里面pip的版本问题
在修改nginx.conf 修改之前加一个 RUN pip3 install pip==20.3.4 就可以了
以下是我改之后的DockerFile
The text was updated successfully, but these errors were encountered: