在ubuntu实时磁盘上运行docker [英] Run docker in ubuntu live disk

查看:125
本文介绍了在ubuntu实时磁盘上运行docker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在 Ubuntu 14.04 USB Live-Disk 中安装和运行Docker。

I was wondering if it's possible to install and run Docker in a Ubuntu 14.04 USB Live-Disk.

我正在尝试具有 8GB USB,4 GB安装和 4 GB用于持久存储,但是在运行容器时仍然会收到错误(拉出不存在问题 strong>)。

I'm trying it with a 8GB USB, 4 GB for installation and 4 GB for persisted storage, but I keep getting errors when running the containers (no problem in pulling them).

这是我的Docker版本:

Here is my Docker version:

$ sudo docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

运行Docker容器时,我得到的是:

And the current error I'm getting when running a docker container is:

[8] System error: mountpoint for cpu not found 

OBS:有时候错误是 cpuset 设备未找到。

OBS: Sometimes the error is that the cpuset or that the devices were not found.

实时磁盘的内核我使用的是:

The kernel of the live-disk that I'm using is:

$ uname -r
3.13.0-32-generic

如果Ubuntu的实时磁盘不是运行Docker的最佳实时磁盘,是否还有其他任何替代方案一些GUI与它,不只是一个简单的终端运行docker?

If the Ubuntu live disk is not the best live-disk to run Docker, are there any other alternatives that have some GUI with it, not just a simple terminal to run docker?

我这样说是因为我正在向Docker介绍Docker,但是他们不想在他们的电脑中安装一个linux,所以我需要一些简单的图形界面来写下Dockerfile,打开一个浏览器等...

I'm saying this because I'm trying to introduce Docker to my parents, but they don't want to install a linux in their PCs, and so I need some simple graphic interface to write down the Dockerfile, open a browser, etc...

更新

我看到在安装过程中,设置cgroup时出现错误-lite依赖关系 initctl:未知作业:cgroup-lite 。另外我读到一些ubuntu需要安装 apparmor ,以便docker安装正常工作。

I saw that during the install there was a error when setting up the cgroup-lite dependency initctl: Unknown job: cgroup-lite. Also I read that some ubuntu need to install apparmor so that the docker installation works properly.

所以我安装了它并重新安装了docker(cgroup- lite安装没有问题,然后),现在我得到这个,当运行 sudo docker -d

So I installed it and reinstalled docker (cgroup-lite installed with no problem then), and now I'm getting this when running the sudo docker -d

INFO[0000] +job serveapi(unix:///var/run/docker.sock)   
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
INFO[0000] +job init_networkdriver()                    
INFO[0000] -job init_networkdriver() = OK (0)           
WARN[0004] Your kernel does not support cgroup swap limit. 
INFO[0004] Loading containers: start.                   
......
INFO[0004] Loading containers: done.                    
INFO[0004] docker daemon: 1.6.2 7c8fca2; execdriver: native-0.2; graphdriver: aufs 
INFO[0004] +job acceptconnections()                     
INFO[0004] -job acceptconnections() = OK (0)            
INFO[0004] Daemon has completed initialization 

当尝试运行一个容器时,我收到>

And when trying to run a container I receive>

ERRO[0125] HTTP Error: statusCode=500 Cannot start container 90875e79dec37cec41a67aac235b81f0fc17c4e011cd6e5368a4b29336587f5b: 
[8] System error: permission denied

不知道内核不支持cgroup,但如果是这样,那么是否可以更新livedisk中的内核(持久化?)?

Not sure about the kernel not supporting cgroup, but if so, then is it possible to update the kernel in the livedisk (persisting it?) ?

推荐答案

我已经设法通过将Docker存储更改为 devicemapper 而不是 AUFS

I've managed to make this work by changing the Docker storage to devicemapper instead of AUFS.

基本上只需要更改 / etc / default / docker 即可: p>

Basically just had to change /etc/default/docker to have this in it:

DOCKER_OPTS="--storage-driver=devicemapper"

我已经设法使容器运行正常,但我更喜欢使用AUFS。

我意识到默认情况下分区没有使用aufs,但是像 caw cow (现在不记得了)

I realized that the partition was not using aufs by default, but something like caw or cow (can't remember now).

我还试图使用AU $使用 grub中的union = aufs 标志,但是当运行docker守护进程时,我得到一个 FATA [0000]由于错误而关闭守护进程:错误intializing graphdriver:不支持备份文件系统该图驱动器,与 https://github.com/docker/docker/issues相关/ 7321

I also tried to make it work using AUFS using the union=aufs flag in grub, but when running the docker daemon I get a FATA[0000] Shutting down daemon due to errors: error intializing graphdriver: backing file system is unsupported for this graph driver, that looks related to https://github.com/docker/docker/issues/7321

我会在这里留下我的答案,因为它是解决这个问题的解决方法,但如果有人设法使用AUFS进行这项工作,在我看来,是一个更好的答案。

I'll leave my answer here, since it is a workaround for this problem, but if anyone manage to make this work using AUFS it would be, in my opinion, a better answer.

这篇关于在ubuntu实时磁盘上运行docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆