【问题标题】:could not determine current runlevel - docker installation无法确定当前运行级别 - docker 安装
【发布时间】:2020-05-08 22:37:13
【问题描述】:

docker-ce 安装为Dockerfile 的一部分,使用以下命令:

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}

给出以下消息:

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.

invoke-rc.d: could not determine current runlevel 是无法确定运行级别的问题吗?

【问题讨论】:

    标签: docker runlevel


    【解决方案1】:

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

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

    【讨论】:

    • 我没有找到仅安装 docker 客户端的说明
    • 这不能回答 OP 的问题。其他包会出现运行级别警告。
    猜你喜欢
    • 1970-01-01
    • 2015-09-18
    • 2021-12-19
    • 2019-04-20
    • 1970-01-01
    • 2021-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多