docker发布redis容器
1.导入redis镜像
2.写docker-compose文件 并创建容器
redis:
container_name: redis
image: redis:latest
ports:
- "6379:6379"
restart: always
3.测试一下
redis:
container_name: redis
image: redis:latest
ports:
- "6379:6379"
restart: always