我正尝试在Ansible的Docker容器中安装GlusterFS。 我有一个错误,所以我试图直接安装在容器中,但我有同样的错误(所以Ansible不是问题):
# apt-get install glusterfs-server Reading package lists... Done Building dependency tree Reading state information... Done glusterfs-server is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up nfs-common (1:1.2.8-6ubuntu1.2) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline invoke-rc.d: unknown initscript, /etc/init.d/statd not found. dpkg: error processing package nfs-common (--configure): subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: nfs-common E: Sub-process /usr/bin/dpkg returned an error code (1)
这似乎是与nfs-common的问题,但我不明白如何解决它。
我试图重现你的问题与Ubuntu的形象,无济于事:
$ cat << EOF > Dockerfile FROM ubuntu:latest RUN apt-get update && apt-get install -y glusterfs-server EOF $ docker build -t glusterfs-server . Sending build context to Docker daemon 36.86 kB Step 1 : FROM ubuntu:latest ---> 4ca3a192ff2a Step 2 : RUN apt-get update && apt-get install -y glusterfs-server ---> Running in eab6258e0b4f [packages are installed] ---> b2a878ae292f Removing intermediate container eab6258e0b4f Successfully built b2a878ae292f $ docker run --rm -it glusterfs-server root@d756093cbcff:/# glusterfs --version glusterfs 3.7.6 built on Dec 25 2015 20:50:44 Repository revision: git://git.gluster.com/glusterfs.git Copyright (c) 2006-2013 Red Hat, Inc. <http://www.redhat.com/> GlusterFS comes with ABSOLUTELY NO WARRANTY. It is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation.
由于这只是一个容器,我build议用一个简单的Dockerfile或者playbook来重新开始。