# docker-redis **Repository Path**: andals/docker-redis ## Basic Information - **Project Name**: docker-redis - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2016-03-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [git](https://gitee.com/andals/docker-redis) # Init ``` git clone git@gitee.com:andals/docker-redis.git redis cd redis prjHome=`pwd` redisVer=4.0.8 ``` # Build pkg ``` docker run -i -t -v $prjHome/:/build --name=build-redis-${redisVer} andals/centos:7 /bin/bash /build/script/build_pkg.sh ``` # Build image ``` docker build -t andals/redis:${redisVer} ./ ``` # Run container ``` // init password is 123 docker run -d --name=redis-${redisVer} -v /data/redis:/data/redis --net=host -e "PORTS=ports_connected_use_comma" andals/redis:${redisVer} PORTS default to be 6379, split use ',', eg: 6379,6380,6381 RPORTS default to be "6380,6381,6382", split use ',', eg: 6380,6381,6382 eg: docker run -d --name=redis-${redisVer} -v /data/redis:/data/redis --net=host -e "PORTS=6379" -e "RPORTS=6380,6381,6382" andals/redis:${redisVer} or docker run -d --name=redis-${redisVer} -v /data/redis:/data/redis --net=host -e "PORTS=6379,6901,6902,6903,6904,6905,6906,6907,6908,6911,6912,6913,6914,6915" -e "RPORTS=6380,6381,6382" andals/redis:${redisVer} ```