-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
33 lines (32 loc) · 1.06 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
33
FROM redis
ENV ROARING_REDIS_GIT_URL https://github.com/aviggiano/redis-roaring.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 "$ROARING_REDIS_GIT_URL"; \
cd redis-roaring; \
bash configure.sh; \
mkdir -p build; \
cd build; \
cmake ..; \
make -j; \
cd ..; \
cp build/libredis-roaring.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/libredis-roaring.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" ]