1、更新redis 7.4.6 8.2.2
2、修改基础镜像
This commit is contained in:
parent
4945d9fbb9
commit
15d3c551a4
@ -13,7 +13,7 @@
|
|||||||
- **Hive**:2.3.3、3.0.0
|
- **Hive**:2.3.3、3.0.0
|
||||||
- **Hexo**:静态博客部署
|
- **Hexo**:静态博客部署
|
||||||
- **Nginx**:多个版本,包括 1.9.9、1.15.0、1.17.0、1.25.4、1.27.2、1.29.1
|
- **Nginx**:多个版本,包括 1.9.9、1.15.0、1.17.0、1.25.4、1.27.2、1.29.1
|
||||||
- **Redis**:4.0.10、6.2.5、7.0.9、7.2.4
|
- **Redis**:4.0.10、6.2.5、7.0.9、7.2.4、7.4.6、8.2.2
|
||||||
- **Zookeeper**:3.4.10、3.4.12、3.4.13、3.5.9、3.6.3、3.7.0、3.7.1、3.8.0、3.8.1、3.9.2
|
- **Zookeeper**:3.4.10、3.4.12、3.4.13、3.5.9、3.6.3、3.7.0、3.7.1、3.8.0、3.8.1、3.9.2
|
||||||
- **Sentinel**:1.8.8
|
- **Sentinel**:1.8.8
|
||||||
- **GitLab**
|
- **GitLab**
|
||||||
|
|||||||
40
redis/7.4.6/Dockerfile
Normal file
40
redis/7.4.6/Dockerfile
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# 构建阶段
|
||||||
|
FROM alpine:3.18
|
||||||
|
MAINTAINER Yang <yangyufans@qq.com>
|
||||||
|
ENV REDIS_VERSION=7.4.6
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
wget \
|
||||||
|
gcc \
|
||||||
|
make \
|
||||||
|
musl-dev \
|
||||||
|
zlib-dev \
|
||||||
|
openssl-dev \
|
||||||
|
linux-headers
|
||||||
|
|
||||||
|
RUN cd / && wget http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& tar -zxvf redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& rm -rf redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& cd /redis-$REDIS_VERSION \
|
||||||
|
&& make MALLOC=libc \
|
||||||
|
&& make install \
|
||||||
|
&& cp /redis-$REDIS_VERSION/redis.conf /usr/local/bin/ \
|
||||||
|
&& cd /
|
||||||
|
|
||||||
|
COPY start.sh /start.sh
|
||||||
|
|
||||||
|
RUN apk add --no-cache libgcc tzdata
|
||||||
|
|
||||||
|
RUN mkdir /redis /redis/conf /redis/logs /redis/data
|
||||||
|
|
||||||
|
RUN chmod +x /start.sh
|
||||||
|
|
||||||
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
|
||||||
|
RUN sed -i 's/logfile ""/logfile "\/redis\/logs\/redis.log"/' /usr/local/bin/redis.conf && \
|
||||||
|
sed -i 's/bind 127.0.0.1/#bind 127.0.0.1/' /usr/local/bin/redis.conf && \
|
||||||
|
sed -i 's/dir .\//dir \/redis\/data\//' /usr/local/bin/redis.conf
|
||||||
|
|
||||||
|
EXPOSE 6379 16379
|
||||||
|
|
||||||
|
ENTRYPOINT ["/start.sh"]
|
||||||
8
redis/7.4.6/start.sh
Normal file
8
redis/7.4.6/start.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ ! -e /redis/conf/redis.conf ]; then
|
||||||
|
cp /usr/local/bin/redis.conf /redis/conf
|
||||||
|
if [ -n "$PASSWORD" ]; then
|
||||||
|
echo "requirepass $PASSWORD" >> /redis/conf/redis.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
redis-server /redis/conf/redis.conf
|
||||||
43
redis/8.2.2/Dockerfile
Normal file
43
redis/8.2.2/Dockerfile
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# 构建阶段
|
||||||
|
FROM alpine:3.18
|
||||||
|
MAINTAINER Yang <yangyufans@qq.com>
|
||||||
|
ENV REDIS_VERSION=8.2.2
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
build-base \
|
||||||
|
linux-headers \
|
||||||
|
tcl \
|
||||||
|
wget \
|
||||||
|
gcc \
|
||||||
|
make \
|
||||||
|
musl-dev \
|
||||||
|
zlib-dev \
|
||||||
|
openssl-dev \
|
||||||
|
linux-headers
|
||||||
|
|
||||||
|
RUN cd / && wget http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& tar -zxvf redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& rm -rf redis-$REDIS_VERSION.tar.gz \
|
||||||
|
&& cd /redis-$REDIS_VERSION \
|
||||||
|
|
||||||
|
RUN make MALLOC=libc && make install
|
||||||
|
|
||||||
|
RUN cp /redis-$REDIS_VERSION/redis.conf /usr/local/bin/ && cd /
|
||||||
|
|
||||||
|
COPY start.sh /start.sh
|
||||||
|
|
||||||
|
RUN apk add --no-cache libgcc tzdata
|
||||||
|
|
||||||
|
RUN mkdir /redis /redis/conf /redis/logs /redis/data
|
||||||
|
|
||||||
|
RUN chmod +x /start.sh
|
||||||
|
|
||||||
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
|
||||||
|
RUN sed -i 's/logfile ""/logfile "\/redis\/logs\/redis.log"/' /usr/local/bin/redis.conf && \
|
||||||
|
sed -i 's/bind 127.0.0.1/#bind 127.0.0.1/' /usr/local/bin/redis.conf && \
|
||||||
|
sed -i 's/dir .\//dir \/redis\/data\//' /usr/local/bin/redis.conf
|
||||||
|
|
||||||
|
EXPOSE 6379 16379
|
||||||
|
|
||||||
|
ENTRYPOINT ["/start.sh"]
|
||||||
8
redis/8.2.2/start.sh
Normal file
8
redis/8.2.2/start.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ ! -e /redis/conf/redis.conf ]; then
|
||||||
|
cp /usr/local/bin/redis.conf /redis/conf
|
||||||
|
if [ -n "$PASSWORD" ]; then
|
||||||
|
echo "requirepass $PASSWORD" >> /redis/conf/redis.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
redis-server /redis/conf/redis.conf
|
||||||
@ -4,13 +4,13 @@
|
|||||||
镜像构建源码请[参考](http://git.yangyufans.com/pub/docker/tree/master/redis)
|
镜像构建源码请[参考](http://git.yangyufans.com/pub/docker/tree/master/redis)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t ccr.ccs.tencentyun.com/yy-dk/redis:4.0.10 .
|
docker build -t ccr.ccs.tencentyun.com/yy-dk/redis:8.2.2 .
|
||||||
```
|
```
|
||||||
|
|
||||||
## 从远程仓库下拉
|
## 从远程仓库下拉
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull ccr.ccs.tencentyun.com/yy-dk/redis:4.0.10
|
docker pull ccr.ccs.tencentyun.com/yy-dk/redis:8.2.2
|
||||||
```
|
```
|
||||||
|
|
||||||
## 创建容器
|
## 创建容器
|
||||||
@ -24,6 +24,6 @@ docker run -d \
|
|||||||
-v /data/redis/logs:/redis/logs \
|
-v /data/redis/logs:/redis/logs \
|
||||||
-v /data/redis/data:/redis/data \
|
-v /data/redis/data:/redis/data \
|
||||||
-e PASSWORD=123456 \
|
-e PASSWORD=123456 \
|
||||||
--name redis-4.0.10 \
|
--name redis-8.2.2 \
|
||||||
ccr.ccs.tencentyun.com/yy-dk/redis:4.0.10
|
ccr.ccs.tencentyun.com/yy-dk/redis:8.2.2
|
||||||
```
|
```
|
||||||
Loading…
Reference in New Issue
Block a user