标签:check local centos com run pass redis chm pos
FROM centos:new
MAINTAINER Devops "devops@baidu.com"
ENV R_DIR /usr/local/redis
ENV I_DIR /opt/redis-3.0.0-rc2
ADD redis-3.0.0-rc2.tar.gz /opt
RUN yum -y install gcc gcc-c++ make
RUN cd /opt/redis-3.0.0-rc2/src && make && make install
RUN mkdir -p /usr/local/redis && \
cp $I_DIR/redis.conf $R_DIR/ && \
cp $I_DIR/sentinel.conf $R_DIR/ && \
cp $I_DIR/src/redis-benchmark $R_DIR && \
cp $I_DIR/src/redis-check-aof $R_DIR && \
cp $I_DIR/src/redis-check-dump $R_DIR && \
cp $I_DIR/src/redis-cli $R_DIR && \
cp $I_DIR/src/redis-sentinel $R_DIR && \
cp $I_DIR/src/redis-server $R_DIR && \
sed -i ‘s/\# bind 127\.0\.0\.1/bind 0\.0\.0\.0/g‘ $R_DIR/redis.conf && \
sed -i ‘s/\# requirepass foobared/requirepass 123456/g‘ $R_DIR/redis.conf
EXPOSE 6379
CMD ["/usr/local/redis/redis-server","/usr/local/redis/redis.conf"]
标签:check local centos com run pass redis chm pos
原文地址:https://www.cnblogs.com/fdjy/p/9116341.html