1

Installing docker-ce as part of Dockerfile, with below command:

ARG DOCKER_VERSION=18.06.1~ce~3-0~debian


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:-18.06.1~ce~3-0~debian}

gives below messages:

Setting up docker-ce (18.06.1~ce~3-0~debian) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

Is invoke-rc.d: could not determine current runlevel an issue to not determine the runlevel?

4

1 回答 1

-1

您正在尝试运行Docker in Docker。这是一种非常先进的骇人听闻的方法,您应该阅读更多相关信息,例如旧博客文章https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

我猜您只想在映像中安装 docker 客户端(而不是守护程序),它将连接到主机操作系统的 docker 守护程序。

于 2020-01-22T18:09:37.003 回答