File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1+ sudo : required
12language : bash
23services : docker
4+ dist : trusty
35
46branches :
57 only :
68 - master
79
8- install :
10+ before_install :
911 - docker build -t eswork/redis .
1012
1113script :
Original file line number Diff line number Diff line change 1- FROM alpine:3.5
1+ FROM alpine:3.6
22LABEL maintainer
"[email protected] " 33
4- ENV REDIS_VERSION=3.2.8 \
4+ ENV REDIS_VERSION=3.2.10 \
55 REDIS_USER=redis \
66 REDIS_DATA_DIR=/var/lib/redis \
77 REDIS_LOG_DIR=/var/log/redis \
Original file line number Diff line number Diff line change 33
44## Supported tags and respective ` Dockerfile ` links
55
6- - [ ` latest ` , ` 3.2.8 ` (3.2.8 /Dockerfile)] ( https://github.com/EsWork/docker-redis/blob/master/Dockerfile )
6+ - [ ` latest ` , ` 3.2.10 ` (3.2.10 /Dockerfile)] ( https://github.com/EsWork/docker-redis/blob/master/Dockerfile )
77
88Introduction
99---
1010
11- 基于` Alpine linux ` 镜像构建` Redis-3.2.8 `
11+ 基于` Alpine linux ` 镜像构建` Redis-3.2.10 `
1212
1313Getting started
1414
Original file line number Diff line number Diff line change 1- 3.2.8
1+ 3.2.10
Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ wget -cq ${REDIS_DOWNLOAD_URL} -O ${REDIS_SETUP_DIR}/src/redis-${REDIS_VERSION}.
1616tar -zxf ${REDIS_SETUP_DIR} /src/redis-${REDIS_VERSION} .tar.gz
1717cd ${REDIS_SETUP_DIR} /src/redis-${REDIS_VERSION}
1818
19- make && make install
19+ grep -q ' ^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' ${REDIS_SETUP_DIR} /src/redis-${REDIS_VERSION} /src/server.h
20+ sed -ri ' s!^(#define CONFIG_DEFAULT_PROTECTED_MODE) 1$!\1 0!' ${REDIS_SETUP_DIR} /src/redis-${REDIS_VERSION} /src/server.h
21+ grep -q ' ^#define CONFIG_DEFAULT_PROTECTED_MODE 0$' ${REDIS_SETUP_DIR} /src/redis-${REDIS_VERSION} /src/server.h
22+
23+ make -j $( getconf _NPROCESSORS_ONLN) && make install
2024
2125mkdir -p /etc/redis/
2226cp redis.conf /etc/redis/redis.conf
@@ -27,6 +31,7 @@ sed 's/^# unixsocket \/tmp\/redis.sock/unixsocket \/run\/redis\/redis.sock/' -i
2731sed ' s/^# unixsocketperm 700/unixsocketperm 777/' -i /etc/redis/redis.conf
2832sed ' /^logfile/d' -i /etc/redis/redis.conf
2933
34+
3035chown -R ${REDIS_USER} :${REDIS_USER} /etc/redis/
3136
3237mkdir -p /run/redis
You can’t perform that action at this time.
0 commit comments