Fuegovic commited on
Commit
15b7f67
1 Parent(s): 7655bc8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -43
Dockerfile CHANGED
@@ -1,49 +1,16 @@
1
- # # Use the official Ubuntu 18.04 image as a base
2
- # FROM ubuntu:18.04
3
 
4
- # # Expose the default Redis port
5
- # EXPOSE 7860
6
 
7
- # # Update the system and install Redis
8
- # RUN apt-get update && apt-get install -y redis-server
9
 
10
- # RUN mkdir -p /etc/lib/redis
11
- # RUN chmod -R 777 /etc/lib/redis
12
 
13
- # COPY redis.conf /etc/redis/redis.conf
14
 
15
- # # Run the Redis server as the main process with the configuration file
16
- # CMD ["redis-server", "/etc/redis/redis.conf"]
17
-
18
-
19
- # Pull base image.
20
- FROM ubuntu
21
-
22
- # Install Redis.
23
- RUN \
24
- cd /tmp && \
25
- wget http://download.redis.io/redis-stable.tar.gz && \
26
- tar xvzf redis-stable.tar.gz && \
27
- cd redis-stable && \
28
- make && \
29
- make install && \
30
- cp -f src/redis-sentinel /usr/local/bin && \
31
- mkdir -p /etc/redis && \
32
- cp -f *.conf /etc/redis && \
33
- rm -rf /tmp/redis-stable* && \
34
- sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
35
- sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
36
- sed -i 's/^\(dir .*\)$/# \1\ndir \/data/' /etc/redis/redis.conf && \
37
- sed -i 's/^\(logfile .*\)$/# \1/' /etc/redis/redis.conf
38
-
39
- # Define mountable directories.
40
- VOLUME ["/data"]
41
-
42
- # Define working directory.
43
- WORKDIR /data
44
-
45
- # Define default command.
46
  CMD ["redis-server", "/etc/redis/redis.conf"]
47
-
48
- # Expose ports.
49
- EXPOSE 6379
 
1
+ # Use the official Ubuntu 18.04 image as a base
2
+ FROM ubuntu:18.04
3
 
4
+ # Expose the default Redis port
5
+ EXPOSE 7860
6
 
7
+ # Update the system and install Redis
8
+ RUN apt-get update && apt-get install -y redis-server
9
 
10
+ RUN mkdir -p /etc/lib/redis
11
+ RUN chmod -R 777 /etc/lib/redis
12
 
13
+ COPY redis.conf /etc/redis/redis.conf
14
 
15
+ # Run the Redis server as the main process with the configuration file
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  CMD ["redis-server", "/etc/redis/redis.conf"]