Guest User

Untitled

a guest
Jan 19th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. FROM centos:latest
  2.  
  3. RUN
  4.  
  5. yum install -y wget gcc gcc-c++ make &&
  6. yum install -y epel-release &&
  7. yum update -y &&
  8. yum install -y python-pip &&
  9. pip install redis &&
  10.  
  11. cd /tmp &&
  12.  
  13. wget http://download.redis.io/redis-stable.tar.gz &&
  14.  
  15. tar xvzf redis-stable.tar.gz &&
  16.  
  17. cd redis-stable &&
  18.  
  19. make &&
  20.  
  21. make install &&
  22.  
  23. cp -f src/redis-sentinel /usr/local/bin &&
  24.  
  25. mkdir -p /etc/redis &&
  26.  
  27. cp -f *.conf /etc/redis &&
  28.  
  29. rm -rf /tmp/redis-stable* &&
  30.  
  31. sed -i 's/^(bind .*)$/# 1/' /etc/redis/redis.conf &&
  32.  
  33. #sed -i 's/^(daemonize .*)$/# 1/' /etc/redis/redis.conf &&
  34.  
  35. sed -e "s/^daemonize no$/daemonize yes/" &&
  36.  
  37. sed -i 's/^(dir .*)$/# 1ndir /data/' /etc/redis/redis.conf &&
  38.  
  39. sed -i 's/^(logfile .*)$/# 1/' /etc/redis/redis.conf
  40.  
  41. # Define mountable directories.
  42.  
  43. #VOLUME ["/data"]
  44.  
  45.  
  46.  
  47. # Define working directory.
  48.  
  49. WORKDIR /opt
  50. COPY . .
  51.  
  52.  
  53. # Define default command.
  54.  
  55. CMD ["redis-server"]
  56.  
  57. # Expose ports
  58.  
  59. EXPOSE 6379
  60.  
  61. RUN python test.py
  62.  
  63. ```[![enter image description here][1]][1]
  64.  
  65.  
  66. [1]: https://i.stack.imgur.com/IVfZA.png
Add Comment
Please, Sign In to add comment