gpt4 book ai didi

ubuntu - 在 Ubuntu docker 镜像上运行 Docker

转载 作者:行者123 更新时间:2023-12-02 19:06:46 25 4
gpt4 key购买 nike

我无法让 Docker CE 在 Ubuntu Docker 镜像上运行。这是我的Dockerfile :

FROM ubuntu:16.04

RUN apt-get update && apt-get install -y curl apt-transport-https ca-certificates curl gnupg2 software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update && apt-get install -y docker-ce

RUN docker info

最后一个命令失败并显示以下内容:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
如果我尝试运行 dockerd从容器中,它返回以下内容:
ERRO[2018-04-12T14:35:43.945962200Z] 'overlay2' is not supported over overlayfs
INFO[2018-04-12T14:35:43.974187900Z] Graph migration to content-addressability took 0.00 seconds
INFO[2018-04-12T14:35:43.976355700Z] Loading containers: start.
WARN[2018-04-12T14:35:43.978060300Z] Running modprobe bridge br_netfilter failed with message: , error: exec: "modprobe": executable file not found in $PATH
WARN[2018-04-12T14:35:43.978173000Z] Running modprobe nf_nat failed with message: ``, error: exec: "modprobe": executable file not found in $PATH
WARN[2018-04-12T14:35:43.978965200Z] Running modprobe xt_conntrack failed with message: ``, error: exec: "modprobe": executable file not found in $PATH
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.0: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)

我假设 ubuntu 的内核中缺少某些内容图片?

这是 uname -a 的输出,来自容器:
root@85bdefe67e4a:/# uname -a
Linux 85bdefe67e4a 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ubuntu:16.04 有问题吗?容器还是我忘记了什么?

最佳答案

这已经完成了。它在 docker 中被称为 docker。

Docker 镜像已存在于 Dockerhub您可以查看dind下的源代码.

关于ubuntu - 在 Ubuntu docker 镜像上运行 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49799563/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com