-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
32 lines (31 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM redis
ENV TAIRZSET_URL https://github.com/alibaba/TairZset.git
RUN set -ex; \
\
BUILD_DEPS=' \
ca-certificates \
cmake \
gcc \
git \
g++ \
make \
'; \
apt-get update; \
apt-get install -y $BUILD_DEPS --no-install-recommends; \
rm -rf /var/lib/apt/lists/*; \
git clone "$TAIRZSET_URL"; \
cd TairZset; \
mkdir -p build; \
cd build; \
cmake ..; \
make -j; \
cd ..; \
cp lib/tairzset_module.so /usr/local/lib/; \
\
apt-get purge -y --auto-remove $BUILD_DEPS
ADD http://download.redis.io/redis-stable/redis.conf /usr/local/etc/redis/redis.conf
RUN sed -i '1i loadmodule /usr/local/lib/tairzset_module.so' /usr/local/etc/redis/redis.conf; \
chmod 644 /usr/local/etc/redis/redis.conf; \
sed -i 's/^bind 127.0.0.1/#bind 127.0.0.1/g' /usr/local/etc/redis/redis.conf; \
sed -i 's/^protected-mode yes/protected-mode no/g' /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]