修正Dockerfile由于镜像下载慢的问题
parent
c0e8bc77e0
commit
ef3c490859
|
@ -12,13 +12,6 @@ VOLUME /project
|
||||||
# setup workdir
|
# setup workdir
|
||||||
WORKDIR /project
|
WORKDIR /project
|
||||||
|
|
||||||
# setup mirrors of apt
|
|
||||||
# https://mirrors.tuna.tsinghua.edu.cn/help/debian/
|
|
||||||
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
# update apt packages
|
# update apt packages
|
||||||
RUN apt-get update -y && apt-get upgrade -y \
|
RUN apt-get update -y && apt-get upgrade -y \
|
||||||
&& apt-get install apt-utils -y \
|
&& apt-get install apt-utils -y \
|
||||||
|
@ -40,10 +33,6 @@ RUN npm install -g cnpm --registry=https://registry.npm.taobao.org \
|
||||||
COPY ./cloud-center/gitsh /project/tools/gitsh
|
COPY ./cloud-center/gitsh /project/tools/gitsh
|
||||||
RUN chmod +x /project/tools/gitsh
|
RUN chmod +x /project/tools/gitsh
|
||||||
|
|
||||||
# setup mirrors of pip
|
|
||||||
# https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
|
|
||||||
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
|
|
||||||
# python pip install dependencies
|
# python pip install dependencies
|
||||||
COPY ./cloud-center/requirements.txt /project/requirements.txt
|
COPY ./cloud-center/requirements.txt /project/requirements.txt
|
||||||
|
|
||||||
|
@ -66,5 +55,16 @@ RUN echo "alias ll='ls -la'" >> /root/.bashrc
|
||||||
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
&& date
|
&& date
|
||||||
|
|
||||||
|
# setup mirrors of apt
|
||||||
|
# https://mirrors.tuna.tsinghua.edu.cn/help/debian/
|
||||||
|
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
# setup mirrors of pip
|
||||||
|
# https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
|
||||||
|
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
# on start up
|
# on start up
|
||||||
CMD ["python3"]
|
CMD ["python3"]
|
||||||
|
|
|
@ -12,10 +12,6 @@ VOLUME /project
|
||||||
# setup workdir
|
# setup workdir
|
||||||
WORKDIR /project
|
WORKDIR /project
|
||||||
|
|
||||||
# setup mirrors of pip
|
|
||||||
# https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
|
|
||||||
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
|
||||||
|
|
||||||
# upgrade pip
|
# upgrade pip
|
||||||
RUN pip install --no-cache-dir --upgrade pip \
|
RUN pip install --no-cache-dir --upgrade pip \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
|
@ -25,13 +21,6 @@ RUN pip install --no-cache-dir --upgrade pip \
|
||||||
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
&& date
|
&& date
|
||||||
|
|
||||||
# setup mirrors of apt
|
|
||||||
# https://mirrors.tuna.tsinghua.edu.cn/help/debian/
|
|
||||||
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list \
|
|
||||||
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
# update apt packages
|
# update apt packages
|
||||||
RUN apt-get update -y && apt-get upgrade -y \
|
RUN apt-get update -y && apt-get upgrade -y \
|
||||||
&& apt-get install apt-utils -y \
|
&& apt-get install apt-utils -y \
|
||||||
|
@ -40,4 +29,15 @@ RUN apt-get update -y && apt-get upgrade -y \
|
||||||
# setup alias
|
# setup alias
|
||||||
RUN echo "alias ll='ls -la'" >> /root/.bashrc
|
RUN echo "alias ll='ls -la'" >> /root/.bashrc
|
||||||
|
|
||||||
|
# setup mirrors of apt
|
||||||
|
# https://mirrors.tuna.tsinghua.edu.cn/help/debian/
|
||||||
|
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list \
|
||||||
|
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
# setup mirrors of pip
|
||||||
|
# https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
|
||||||
|
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
CMD ["python3"]
|
CMD ["python3"]
|
||||||
|
|
Loading…
Reference in New Issue