如何增加CentOS7中docker的空间?

如何增加CentOS7中docker的空间?

我如何增加此 docker 上的空间?我需要将 30G 的图像传输到此 docker 中,以便在 docker 内进行图像处理,但似乎只有 2G 可用

$ sudo docker pull benbuleong/openface-cambridge

$ xhost +

$ sudo docker run -p 9000:9000 -p 8000:8000  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -t -i benbuleong/openface-cambridge /bin/bash

我打算使用以下命令将 30G 文件夹从我的机器复制到 docker:

docker cp <folder_to_copy> <docker_container_name>:/opt/OpenFace/build/bin/images

mona@dhcp-wifi-8021x-155-41-46-188:~ $ uname -a
Darwin dhcp-wifi-8021x-155-41-46-188.bu.edu 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64

mona@dhcp-wifi-8021x-155-41-46-188:~ $ df -h
Filesystem      Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1   234Gi  226Gi  2.4Gi    99% 3414844 9223372036851360963    0%   /
devfs          334Ki  334Ki    0Bi   100%    1156                   0  100%   /dev
/dev/disk1s4   234Gi  5.0Gi  2.4Gi    68%       5 9223372036854775802    0%   /private/var/vm
map -hosts       0Bi    0Bi    0Bi   100%       0                   0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0                   0  100%   /home

在我的计算机上:

[jalal@goku images]$ uname -a
Linux goku.bu.edu 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[jalal@goku images]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:    7.4.1708
Codename:   Core
[jalal@goku images]$ docker --version
Docker version 1.12.6, build 85d7426/1.12.6

[jalal@goku images]$ df -h
Filesystem                Size  Used Avail Use% Mounted on
/dev/mapper/vg1-lv1        40G   30G  9.4G  76% /
devtmpfs                   32G     0   32G   0% /dev
tmpfs                      32G  109M   32G   1% /dev/shm
tmpfs                      32G   42M   32G   1% /run
tmpfs                      32G     0   32G   0% /sys/fs/cgroup
/dev/nvme0n1p2            497M  221M  276M  45% /boot
/dev/mapper/vg1-lv2       861G  297G  564G  35% /scratch
/dev/mapper/vg2-scratch2  3.7T  631G  3.1T  17% /scratch2
tmpfs                     6.3G  220K  6.3G   1% /run/user/275735
cs-nfs:/vol/home/grad3    500G  380G  121G  76% /home/grad3
tmpfs                     6.3G     0  6.3G   0% /run/user/262554
cs-nfs:/vol/home/course   200G   31G  170G  16% /home/course
tmpfs                     6.3G  4.0K  6.3G   1% /run/user/260429

我正在使用 CentOS 7。

答案1

事实证明我可以通过以下命令解决此问题:(注意:z)

sudo docker run -p 9000:9000 -p 8000:8000  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /scratch2/datasets/new_aff/manually/Manually_Annotated_Images/images:/opt/OpenFace/build/bin/images:z -t -i benbuleong/openface-cambridge /bin/bash

感谢#linux IRC 频道的 lstanley。

相关内容