l,kmoijvb0-u98

用户名:lighthouse

:::color1 第一步:新建或编辑daemon.json

vi /etc/docker/daemon.json

第二步:daemon.json中编辑如下

{

“registry-mirrors”: [“http://hub-mirror.c.163.com“]

}

:::

:::color2 创建docker容器

创建目录

mkdir -p /home/redis/conf

创建文件

touch /home/redis/conf/redis.conf

docker run \

-d \

—name redis \

-p 6379:6379 \

—restart unless-stopped \

-v /home/redis/data:/data \

-v /home/redis/conf/redis.conf:/etc/redis/redis.conf \

redis:bullseye \

redis-server /etc/redis/redis.conf

:::