1. 问题
dockerfile中 使用ubuntu 镜像 执行 RUN apt-get -q update 
 && apt-get -q install -y 更新巨慢
2. 解决
使用国内的镜像源即可解决问题,注意如果使用的 包比较冷门 或者国内镜像网站没同步过来 可能就下载不到镜像
 在dockerfile中 执行安装包命令 或者 RUN apt-get -q update 之前 增加如下内容
RUN  sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN  apt-get clean
示例
RUN  sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN  apt-get clean######
# Install common dependencies from packages. Versions here are either
# sufficient or irrelevant.
#
# WARNING: DO NOT PUT JAVA APPS HERE! Otherwise they will install default
# Ubuntu Java.  See Java section below!
######
# hadolint ignore=DL3008
RUN apt-get -q update \&& apt-get -q install -y --no-install-recommends \apt-utils \bats \build-essential