加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

docker – 如何在Debian上启用AUFS?

发布时间:2020-12-16 03:34:17 所属栏目:安全 来源:网络整理
导读:当我尝试通过以下方式安装docker时: curl -sSL https://get.docker.com/ | sh 我收到消息: Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image

当我尝试通过以下方式安装docker时:

curl -sSL https://get.docker.com/ | sh

我收到消息:

Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.

但是,Debian Jessie似乎不存在任何包:

# apt-get install linux-image-virtual linux-image-extra-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-virtual
E: Unable to locate package linux-image-extra-virtual

我在这里错过了什么?

最佳答案
现代内核不支持aufs,因此您应跳过aufs的overlayfs.只需使用以下选项重新启动docker守护程序:

--storage-driver=overlay2

(或将此选项添加到/ etc / default / docker)

在某些系统中,您应该通过创建带有内容的/etc/systemd/system/docker.service来添加文件/ etc / default / docker的处理以启动过程:

[Service]
EnvironmentFile=-/etc/default/docker
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS 
      $DOCKER_STORAGE_OPTIONS 
      $DOCKER_NETWORK_OPTIONS 
      $BLOCK_REGISTRY 
      $INSECURE_REGISTRY 
      $DOCKER_OPTS

更多信息here

执行

systemctl daemon-reload

要使更改生效.

警告!您的所有图像都无法访问.如果你想保留它们,只需保存并重新加载它们.你可以找到很好的描述here

UPD.我已经将叠加层更改为overlay2,因为它解决了比here更多的问题

UDP.不相关,因为在现代版本的docker(18-06)中默认使用了overlay2.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读