Files
orion-visor/docker/redis/Dockerfile

22 lines
579 B
Docker
Raw Normal View History

2025-07-10 14:28:45 +08:00
FROM --platform=$TARGETPLATFORM redis:6.0.16-alpine
2025-07-05 01:13:28 +08:00
2024-05-17 17:23:43 +08:00
WORKDIR /data
2025-07-05 01:13:28 +08:00
2024-05-28 13:13:17 +08:00
# 系统时区
ARG TZ=Asia/Shanghai
2025-07-05 01:13:28 +08:00
# 添加包 & 设置时区
2024-05-28 13:13:17 +08:00
RUN \
2024-05-29 11:57:14 +08:00
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
2024-05-28 17:07:41 +08:00
apk update && \
2025-07-05 01:13:28 +08:00
apk add --no-cache tzdata && \
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo "${TZ}" > /etc/timezone && \
rm -rf /var/cache/apk/* && \
rm -f /usr/local/redis.conf
# 复制配置文件
2025-07-05 17:44:33 +08:00
COPY ./redis/redis.conf /usr/local/redis.conf
2025-07-05 01:13:28 +08:00
# 启动 Redis 并加载自定义配置
CMD ["redis-server", "/usr/local/redis.conf"]