在docker centos容器上安装Oracle:磁盘空间不足

时间:2015-04-09 12:20:47

标签: oracle11g centos docker

我尝试在docker容器中安装oracle 11g。容器是由centos构建的:6个图像。主持人是fedora21。

oracle安装程序(/ opt / oracle / database / runInstaller)抱怨磁盘空间不足:

SEVERE: [FATAL] [INS-32021] Insufficient disk space on this volume for the selected Oracle home.
CAUSE: The selected Oracle home was on a volume without enough disk space.
ACTION: Choose a location for Oracle home that has enough space (minimum of 4,324MB) or free up space on the existing volume.

确实,码头工人报告的空间还不够:

Filesystem            Size  Used Avail Use% Mounted on
rootfs                9.8G  5.4G  3.9G  58% /
/dev/mapper/docker-253:0-1315729-b9ba9f0049753e5d7cb7e0fc64f68af92a4f9972a8d5e4988acce418bb4a88aa
tmpfs                 7.9G     0  7.9G   0% /dev
shm                    64M     0   64M   0% /dev/shm
/dev/mapper/fedora_lap--alainsavio-root
                   50G   21G   27G  45% /etc/resolv.conf

我可以告诉docker为此容器分配(或报告?)更多磁盘空间吗?

3 个答案:

答案 0 :(得分:1)

谢谢大家的回答。 最后,有效的是:

$ sudo service docker stop
$ sudo rm -rf /var/lib/docker
$ sudo service docker start

!这将删除所有本地docker镜像和容器。

编辑文件/ etc / sysconfig / docker ad修改OPTIONS参数:

# Modify these options if you want to change the way the docker daemon runs
OPTIONS='--selinux-enabled --storage-driver=devicemapper --storage-opt dm.basesize=20G'

请参阅https://docs.docker.com/reference/commandline/cli/#daemon-storage-driver-option

答案 1 :(得分:0)

是的,您可以为容器提供超过10 Gb的默认值,请参阅此文章https://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/

答案 2 :(得分:0)

修改主机上/etc/default/docker文件中的Docker选项。 DOCKER_OPTS="--storage-driver=devicemapper --storage-opt dm.basesize=20G"

(!)现有的容器和图像可能会丢失。