我正在尝试为Couchbase创建一个Docker镜像,使用CentOS镜像的Dockerfile时遇到以下错误:
# expose default port
EXPOSE 8091
ENV PATH $PATH:/opt/couchbase/bin
RUN cd /var/tmp &&\
wget http://packages.couchbase.com/releases/2.5.0/couchbase-server-enterprise_2.5.0_x86_64.rpm &&\
rpm -ivh couchbase-server-enterprise_2.5.0_x86_64.rpm &&\
chkconfig couchbase-server on &&\
service couchbase-server start
#add start script to the container
ADD start /start
#make the script executable
RUN chmod 0755 /start
EXPOSE 11211 11210 11209 4369 8092 18091 18092 11214 11215
#start mysql service and launch the command console
CMD ["/start"]
在构建时,我遇到了以下错误...
ulimit: open files: cannot modify limit: Operation not permitted
ulimit: max locked memory: cannot modify limit: Operation not permitted
我在一个论坛上看到,我们可以在docker.conf文件中设置这些值。但是我尝试创建了这个文件/etc/init/docker.conf并在其中放置以下行- limit memlock unlimited unlimited limit nofile 262144
但是我仍然得到相同的错误。
如果我在CentOS VM上手动按照相同的步骤操作,它可以正常工作。所以我想我需要在Docker CentOS镜像上设置一些东西。
-bash: ulimit: max locked memory: cannot modify limit: Operation not permitted
。 - Shardj