关于memcache的dockerfile

原文链接: http://www.cnblogs.com/cnyw/p/10132036.html

今天闲着无聊,想随便玩玩,就写了一个关于memcache的dockerfile,亲测成功。

下面是dockerfile:

FROM centos
MAINTAINER [email protected]                        
COPY libevent-2.1.8-stable.tar.gz .
COPY memcached-1.5.10.tar.gz .
RUN yum install gcc make -y && tar xvf libevent-2.1.8-stable.tar.gz && rm -rf libevent-2.1.8-stable.tar.gz && cd libevent-2.1.8-stable && \
./configure --prefix=/usr/local/libevent && make && make install && cd .. && \
tar xvf memcached-1.5.10.tar.gz && rm -rf memcached-1.5.10.tar.gz && cd memcached-1.5.10 && \
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/ && \
make && make install
EXPOSE 11211
USER daemon
ENTRYPOINT /usr/local/memcached/bin/memcached
CMD ["-m 2048", "-c 65535"]

连接测试:

telnet   ip  端口

如:telnet  192.168.2.22 11211

 

转载于:https://www.cnblogs.com/cnyw/p/10132036.html

你可能感兴趣的:(关于memcache的dockerfile)