不支持Ubuntu中的Docker切换文件系统到覆盖?

时间:2017-01-29 22:16:13

标签: ubuntu docker devops linux-containers device-mapper

我在以root用户身份登录的Mac上使用Ubuntu在流浪汉虚拟盒子中运行docker,我正在尝试从devicemapper切换到overlay,但是我收到错误消息:

String[] strings = {"Mark", "James", "Paul"};
        LinearLayout layout = (LinearLayout)findViewById(R.id.linearlayout);


        for(String s : strings)
        {
             TextView newTextView = new TextView(this);
             newTextView.setText(s);
             newTextView.setSingleLine(true);
             newTextView.setEllipsize(TextUtils.TruncateAt.END);       
             newTextView.setHorizontallyScrolling(true);
             newTextView.setLines(1);
             newTextView.setMarqueeRepeatLimit(-1);
             newTextView.setSelected(true);  
             newTextView.setTextSize(24);
             layout.addView(newTextView);
        }

我尝试过以下说明:

http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/ Unable to start Docker Service in Ubuntu 16.04

但他们都不适合我。

当我尝试按照以下文档进行操作时:

https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/

我在第2步遇到困难,因为grep没有从lsmod返回任何'overlay':

root@vagrant-ubuntu-trusty-64:/# service docker stop
docker stop/waiting
root@vagrant-ubuntu-trusty-64:/# rm -rf /var/lib/docker
root@vagrant-ubuntu-trusty-64:/# docker daemon -s overlay
Command "daemon" is deprecated, and will be removed in Docker 1.16. Please run `dockerd` directly.
INFO[0000] libcontainerd: new containerd process, pid: 6788
WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 max=4096
ERRO[0001] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.
Error starting daemon: error initializing graphdriver: driver not supported
root@vagrant-ubuntu-trusty-64:/#

如何解决此问题?

1 个答案:

答案 0 :(得分:1)

来自https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/#configure-docker-with-the-overlayoverlay2-storage-driver

  

要将Docker配置为使用覆盖存储驱动程序,Docker主机必须运行Linux内核版本3.18(最好是更新版本)并加载覆盖内核模块。对于overlay2驱动程序,内核的版本必须为4.0或更高版本。

你正在运行内核3.13,所以没有骰子。我的建议是备份你的虚拟机并尝试将内核升级到更新的版本(我有14.04并且有更新的内核可用,但尚未测试它们的工作情况)或将你的Ubuntu VM升级到16.04