Skip to content

Commit 17cfe55

Browse files
committed
local queue: parameterize redis version, not listen to default port
1 parent e35fa1e commit 17cfe55

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

redis/Dockerfile_redis_build

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ FROM ubuntu:18.04 as builder
1616

1717
ENV DEBIAN_FRONTEND=noninteractive
1818

19+
ENV REDIS_VERSION=6.2.3
20+
1921
RUN apt-get update && \
2022
apt-get install -y --no-install-recommends \
2123
build-essential \
@@ -44,8 +46,9 @@ RUN apt-get update && \
4446
RUN set -ex && \
4547
mkdir /build && \
4648
cd /build && \
47-
wget https://github.com/redis/redis/archive/refs/tags/6.2.1.tar.gz && \
48-
tar -xvf 6.2.1.tar.gz && \
49-
cd redis-6.2.1 && \
49+
wget https://github.com/redis/redis/archive/refs/tags/${REDIS_VERSION}.tar.gz && \
50+
tar -xvf ${REDIS_VERSION}.tar.gz && \
51+
mv redis-${REDIS_VERSION} redis && \
52+
cd redis && \
5053
make
5154

redis/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ default: redis-server
2020

2121
include ../docker.mk
2222

23-
redis-server: Dockerfile_redis_build
23+
redis-server: Dockerfile_redis_build Makefile
2424
echo "Building redis server"
2525
mkdir -p redis-server
2626
$(call build_image,Dockerfile_redis_build,redis_local_queue)
27-
docker run -i --rm -u $$(id -u):$$(id -g) -v $(CURDIR):/temp -w /temp --ulimit nofile=262144:262144 redis_local_queue:$(VERSION) cp /build/redis-6.2.1/src/redis-server redis-server/.
27+
docker run -i --rm -u $$(id -u):$$(id -g) -v $(CURDIR):/temp -w /temp --ulimit nofile=262144:262144 redis_local_queue:$(VERSION) cp /build/redis/src/redis-server redis-server/.
2828
echo "appendonly no" > redis-server/redis_sock.conf
2929
echo "save \"\"" >> redis-server/redis_sock.conf
30+
echo "port 0" >> redis-server/redis_sock.conf
3031
echo "unixsocket /opt/mfn/redis-server/redis.sock" >> redis-server/redis_sock.conf
3132
echo "unixsocketperm 700" >> redis-server/redis_sock.conf
3233

0 commit comments

Comments
 (0)