【openeuler/redis docker image overview】

在这里插入图片描述

Quick reference

Redis | openEuler

Current Redis docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

Redis is the world’s fastest in-memory database. It provides cloud and on-prem solutions for caching, vector search, and NoSQL databases that seamlessly fit into any tech stack—making it simple for digital customers to build, scale, and deploy the fast apps our world runs on. Learn more on the Redis website⁠.

Supported tags and respective Dockerfile links

The tag of each redis docker image is consist of the version of redis and the version of basic image. The details are as follows

TagsCurrentlyArchitectures
6.2.7-oe2203ltsRedis 6.2.7 on openEuler 22.03-LTSamd64, arm64
7.2.4-oe2203sp3Redis 7.2.4 on openEuler 22.03-LTS-SP3amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} and container startup options based on their requirements.

  • Pull the openeuler/redis image from docker
docker pull openeuler/redis:{Tag}
  • Start a redis instance
docker run -d --name my-redis -p 6379:6379 openeuler/redis:{Tag}
  • Start with persistent storage
    As follows, this will save a snapshot of the DB every 60 seconds if at least 1 write operation was performed.
docker run --name my-redis -d openeuler/redis:{Tag} redis-server --save 60 1 --loglevel warning
  • View container running logs
docker logs -f my-redis
  • To get an interactive shell
docker exec -it my-redis /bin/bash
  • Connect to a redis instance

Connect to a local redis instance using loopback address

docker run --name my-redis -d -p 6379:6379 openeuler/redis:{Tag}
redis-cli -h 127.0.0.1 -p 6379

If you want connect the redis instance using hostip, you should connect to the instance using loopback,
and then configure as belows

config set protected-mode no
  • Container startup options
OptionDescription
-p 6379:6379Expose redis on localhost:30073.
-e ALLOW_EMPTY_PASSWORD=yesSet to yes to allow connections to redis-server without a password. This setting is not recommended in production environments.
-e REDIS_PASSWORDSet the desired password to be used.
-e REDIS_RANDOM_PASSWORD=1Set this variable to 1 if you would like the entrypoint script to generate a random password for you. You will be able to see the generated password in the logs (docker logs).
-e REDIS_ALLOW_REMOTE_CONNECTIONS=yesSet to no to disallow remote connections to redis-server (i.e., make redis-server listen to 127.0.0.1 only).
-e REDIS_EXTRA_FLAGSSpecify extra flags to be passed to redis-server when initializing it.
-v /path/to/redis.conf:/etc/redis/redis.confLocal configuration file redis.conf (try this example⁠). To enable TLS mode, comment the port 6379 line and uncomment the # port 0 and # tls-port 6379 lines.

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值