下载镜像
docker pull redis:6.2.3
docker-compose.yml
mkdir -p /opt/redis
cd /opt/redis
vim docker-compose.yml
version: "3.8"
services:
postgres:
image: redis:6.2.3
container_name: redis
environment:
TZ: Asia/Shanghai
ports:
- 6379:6379
restart: always
启动服务
docker-compose up -d