在docker(Debian wheezy)中安装pure-ftpd,错误421

我试图设置一个简单的容器,我与docker运行纯ftpd。

但是在运行service pure-ftpd start我得到这个错误:

 Starting ftp server: Running: /usr/sbin/pure-ftpd -l pam -E -8 UTF-8 -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -B 421 Unable to switch capabilities : Operation not permitted 

这里是testing这个的Dockerfile:

 FROM debian:wheezy ENV DEBIAN_FRONTEND noninteractive RUN apt-get -y update RUN apt-get install -y pure-ftpd-common pure-ftpd CMD service pure-ftpd start && \ /bin/bash EXPOSE 21/tcp 

在这个testing中,我使用的是debian wheezy,但是我也尝试过使用Ubuntu,所以我得到了同样的错误。


[编辑]

使用此修补程序的工作版本现在可在此处find: https : //index.docker.io/u/stilliard/pure-ftpd/

看来你的主机不允许能力切换。

您可以通过添加--without-capabilities来修改pure-ftpd源代码包中的optflags

添加Docker文件的步骤

  • apt-get source pure-ftpd
  • rules文件中,附加sed --without-capabilities选项
  • 使用dpkg-buildpackage -b -uc来构build软件包并使用dpkg -i安装

这应该做的伎俩。