传输已关闭,剩余 xxxxx 字节可供读取

传输已关闭,剩余 xxxxx 字节可供读取

尝试5:19.03.4~3-0~debian-stretch使用 dockerfile 下载 docker-ce 的版本():

# apt-cache madison docker-ce
 docker-ce | 5:19.03.4~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
 docker-ce | 5:19.03.3~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
 docker-ce | 5:19.03.2~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
 docker-ce | 5:19.03.1~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages
 docker-ce | 5:19.03.0~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages

下面是 dockerfile:

FROM jenkins/jenkins:2.190.2

ENV DEBIAN_FRONTEND=noninteractive

# Official Jenkins image does not include sudo, change to root user
USER root

# Used to set the docker group ID
# Set to 497 by default, which is the groupID used by AWS Linux ECS instance
ARG DOCKER_GID=497

# Create Docker Group with GID
# Set default value of 497 if DOCKER_GID set to blank string by Docker compose
RUN groupadd -g ${DOCKER_GID:-497} docker

# Install base packages for docker, docker-compose & ansible
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
RUN apt-get update -y && \
    apt-get -y install bc \
                    gawk \
                    libffi-dev \
                    musl-dev \
                    apt-transport-https \
                    curl \
                    python3 \
                    python3-dev \
                    python3-setuptools \
                    gcc \
                    make \
                    libssl-dev \
                    python3-pip 

# Used at build time but not runtime
ARG DOCKER_VERSION=5:19.03.4~3-0~debian-stretch

# Install the latest Docker CE binaries and add user `jenkins` to the docker group
RUN apt-get update && \
    apt-get -y install apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common && \
    curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
    add-apt-repository \
      "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
      $(lsb_release -cs) \
      stable" && \
    apt-get update && \
    apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch}  \
        docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch} \
        containerd.io && \
    usermod -aG docker jenkins && \
    usermod -aG users jenkins

ARG DOCKER_COMPOSE=1.24.1

# Install docker compose
RUN curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE:-1.24.1}/docker-compose-$(uname -s)-$(uname -m)" \
    -o /usr/local/bin/docker-compose && \
    chmod +x /usr/local/bin/docker-compose && \
    pip3 install ansible boto3

# Change to jenkins user
USER jenkins

# Add jenkins plugin
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt

下载并安装5:19.03.4~3-0~debian-stretchdocker-ce 版本

docker主机上的磁盘配额:

$ sudo ls /var/lib/docker/165536.165536/
builder  buildkit  containers  image  network  overlay2  plugins  runtimes  swarm  tmp  trust  volumes
$ df /
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda7       67327600 16184040  47700464  26% /

docker-compose 文件jenkins_home在 docker 主机上创建volume():

version: '2'

volumes:
  jenkins_home:
    external: true

services:
  jenkins:
    build:
      context: .
      args:
        DOCKER_GID: ${DOCKER_GID}
        DOCKER_VERSION: ${DOCKER_VERSION}
        DOCKER_COMPOSE: ${DOCKER_COMPOSE}
    volumes:
      - jenkins_home:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "8080:8080"

docker-compose up -d给出以下错误:

Step 8/14 : ARG DOCKER_VERSION=5:19.03.4~3-0~debian-stretch
 ---> Running in 10f76e84e104
Removing intermediate container 10f76e84e104
 ---> 66b530666094

Step 9/14 : RUN apt-get update &&     apt-get -y install apt-transport-https     ca-certificates     curl     gnupg-agent     software-properties-common &&     curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey &&     add-apt-repository       "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")       $(lsb_release -cs)       stable" &&     apt-get update &&     apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch}          docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch}         containerd.io &&     usermod -aG docker jenkins &&     usermod -aG users jenkins


:
:
:
Get:19 http://security.debian.org/debian-security stretch/updates/main amd64 sudo amd64 1.8.19p1-2.1+deb9u1 [1054 kB]


Get:20 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce-cli amd64 5:19.03.4~3-0~debian-stretch [42.5 MB]
Err:20 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce-cli amd64 5:19.03.4~3-0~debian-stretch
  transfer closed with 30852358 bytes remaining to read
Get:21 https://download.docker.com/linux/debian stretch/stable amd64 docker-ce amd64 5:19.03.4~3-0~debian-stretch [22.8 MB]
Fetched 54.6 MB in 1min 8s (794 kB/s)
E: Failed to fetch https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce-cli_19.03.4~3-0~debian-stretch_amd64.deb  transfer closed with 30852358 bytes remaining to read
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-get update &&     apt-get -y install apt-transport-https     ca-certificates     curl     gnupg-agent     software-properties-common &&     curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey &&     add-apt-repository       "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")       $(lsb_release -cs)       stable" &&     apt-get update &&     apt-get -y install docker-ce=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch}          docker-ce-cli=${DOCKER_VERSION:-5:19.03.4~3-0~debian-stretch}         containerd.io &&     usermod -aG docker jenkins &&     usermod -aG users jenkins' returned a non-zero code: 100

66b530666094分析容器id中的空间配额:

$ docker run -it 66b530666094 bash
root@565b3a0ebfc2:/# 
root@565b3a0ebfc2:/# df /
Filesystem     1K-blocks     Used Available Use% Mounted on
overlay         67327600 16335448  47549056  26% /
root@565b3a0ebfc2:/# pwd
/
root@565b3a0ebfc2:/# whoami
root
root@565b3a0ebfc2:/# exit
exit
$

这个问题是从今天晚上开始发生的...否则这个 docker 文件工作正常..

如何解决此下载错误?这个错误意味着什么?

相关内容