Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM centos:latest
- RUN
- yum install -y wget gcc gcc-c++ make &&
- yum install -y epel-release &&
- yum update -y &&
- yum install -y python-pip &&
- pip install redis &&
- cd /tmp &&
- wget http://download.redis.io/redis-stable.tar.gz &&
- tar xvzf redis-stable.tar.gz &&
- cd redis-stable &&
- make &&
- make install &&
- cp -f src/redis-sentinel /usr/local/bin &&
- mkdir -p /etc/redis &&
- cp -f *.conf /etc/redis &&
- rm -rf /tmp/redis-stable* &&
- sed -i 's/^(bind .*)$/# 1/' /etc/redis/redis.conf &&
- #sed -i 's/^(daemonize .*)$/# 1/' /etc/redis/redis.conf &&
- sed -e "s/^daemonize no$/daemonize yes/" &&
- sed -i 's/^(dir .*)$/# 1ndir /data/' /etc/redis/redis.conf &&
- sed -i 's/^(logfile .*)$/# 1/' /etc/redis/redis.conf
- # Define mountable directories.
- #VOLUME ["/data"]
- # Define working directory.
- WORKDIR /opt
- COPY . .
- # Define default command.
- CMD ["redis-server"]
- # Expose ports
- EXPOSE 6379
- RUN python test.py
- ```[![enter image description here][1]][1]
- [1]: https://i.stack.imgur.com/IVfZA.png
Add Comment
Please, Sign In to add comment