Public Repository

Last pushed: 2 years ago
Short Description
Dockerfile-redis2
Full Description

Dockerfile-redis2

Dockerfile For redis2

To run:

start a redis instance

docker run -d -p 6379:6379 -v /opt/docker-volumes/redis2/db:/opt/redis/db -v /opt/docker-volumes/redis2/log/:/opt/redis/log --name redis2 wjw465150/redis2

note:redis.conf is in /opt/redis/dbpath!

Dockfile

#
# redis2 Dockerfile
#
#

# Pull base image.
FROM centos:centos6

MAINTAINER wjw465150 <wjw465150@gmail.com>

ADD run.sh /run.sh 

COPY ./redis-2.8.17.tar.gz /opt/

RUN yum -y install sed grep unzip tar wget gcc make file && \
  cd /opt/ && \
  tar -zxvf ./redis-2.8.17.tar.gz && \
  cd redis-2.8.17 && \
  make PREFIX=/opt/redis install && \
  mkdir -p /opt/redis && \
  mkdir -p /opt/redis/log && \
  mkdir -p /opt/redis/db && \
  rm -rf /opt/redis-2.8.17/ && \
  rm -f /opt/redis-2.8.17.tar.gz && \
  chmod +x /run.sh

COPY ./redis.conf /opt/redis/db/redis.conf 

# Environment Variable

#export port
EXPOSE 6379

WORKDIR /opt/redis

CMD ["/run.sh"]
Docker Pull Command
Owner
wjw465150

Comments (0)