我一直试图让docker-in-docker为一个CentOS 7图像工作,以ubuntu作为主机图像。
到目前为止,我还没有开始将其构建为泊坞窗图像。目前正在尝试使用bash来解决如何让Docker中的docker工作的问题"
当前systemctl start docker
在内部docker镜像内部运行CentOS会出现以下错误
Error: No space left on device
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
对错误systemctl status docker
的进一步调查给出了以下内容
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=warning msg="Running modprobe bridge nf_nat failed with message: , error: exit status 1"
Oct 13 04:32:08 codenvy docker[6520]: time="2015-10-13T04:32:08Z" level=info msg="-job init_networkdriver() = OK (0)"
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=warning msg="Your kernel does not support cgroup swap limit."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=info msg="Loading containers: start."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=info msg="Loading containers: done."
Oct 13 04:32:09 codenvy docker[6520]: time="2015-10-13T04:32:09Z" level=fatal msg="Shutting down daemon due to errors: inotify_add_watch: no space left on device"
Oct 13 04:32:09 codenvy systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Oct 13 04:32:09 codenvy systemd[1]: Failed to start Docker Application Container Engine.
Oct 13 04:32:09 codenvy systemd[1]: Unit docker.service entered failed state.
其他信息
注意
这不是关于如何安装codenvy,它是关于让docker本身安装和工作。在安装codenvy之前
已添加:df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/hc--dawn--vg-root 27G 3.5G 23G 14% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 16G 12K 16G 1% /dev
tmpfs 3.2G 1.1M 3.2G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 16G 37M 16G 1% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 95M 129M 43% /boot
/dev/mapper/base--storage-docker--files 886G 52G 790G 7% /mnt/docker-files-lvm
注意:/ mnt / docker-files-lvm / docker映射到/ mnt / docker-files-lvm(即790GB)
答案 0 :(得分:1)
如果没有剩余空间问题,您可以配置泊坞窗以将图像和容器存储在其他位置。
由于您使用的是systemctl,配置文件位于:
NSInteger numberOfButtons = 10;
NSMutableArray *menuButtonsMutableArray = [[NSMutableArray alloc] initWithCapacity:numberOfButtons];
for (int i = 0; i < numberOfButtons; i++) {
UIButton *button = [UIButton new];
//layout your button somehow
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
[button setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
[button addTarget:self action:@selector(menuButtonDidTap:) forControlEvents:UIControlEventTouchUpInside];
[menuButtonsMutableArray addObject:button];
}
self.menuButtonsArray = [menuButtonsMutableArray copy];
您可以添加- (void)menuButtonDidTap:(UIButton *)sender {
for (UIButton *button in self.menuButtonsArray) {
button.selected = (button == sender);
}
}
选项来更改docker存储内容的位置。
例如:
/lib/systemd/system/docker.service