文档说明:只记录关键地方;
试验环境: linux debian 11
redis
version: "3"
services:
redis-server:
image: redis:7-alpine
ports:
- "6379:6379"
container_name: redis-server
networks:
- default
启动、关闭、查看日志
# 启动
docker-compose -f docker-compose.yaml up -d
# 关闭
docker-compose -f docker-compose.yaml down --remove-orphans
# 查看日志
docker-compose -f docker-compose.yaml logs -f