# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

FROM alpine:3.16

RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com|g' /etc/apk/repositories

RUN apk update && \
    apk upgrade && \
    apk add --no-cache 'redis'

COPY redis.conf /etc/

VOLUME  /srv/redis
WORKDIR /srv/redis

RUN apk del gcc rpcgen gdb

EXPOSE 6379
CMD ["redis-server", "/etc/redis.conf"]
