这是我的 docker compose yaml 文件
version: "3.7"
services:
dynamo:
image: bazel/production/local/docker/dynamodb:dynamodb
env_file: dynamodb/${ENV}.env
ports:
- 7070:7070
volumes:
- ${REPO}/production/local/docker/dynamodb/start_dynamo.sh:/home/dynamodblocal/start.sh
- dynamo-data:/home/dynamodblocal
entrypoint: ""
command: /home/dynamodblocal/start.sh
redis50_cluster:
image: bazel/production/local/docker/redis50:redis50
ports:
- 6380:6380
- 6381:6381
- 6382:6382
volumes:
- ${REPO}/production/local/docker/redis50/entrypoint.sh:/usr/local/bin/entrypoint.sh
- ${REPO}/production/local/docker/redis50/redis-cluster-node0.conf:/etc/redis/redis-cluster-node0.conf
- ${REPO}/production/local/docker/redis50/redis-cluster-node1.conf:/etc/redis/redis-cluster-node1.conf
- ${REPO}/production/local/docker/redis50/redis-cluster-node2.conf:/etc/redis/redis-cluster-node2.conf
- ${REPO}/production/local/docker/redis50/init_redis.sh:/usr/local/bin/init_redis.sh
- ${REPO}/production/local/docker/redis50/check_redis.sh:/usr/local/bin/check_redis.sh
- redis50-data:/data
healthcheck:
test: ["CMD", "check_redis.sh"]
interval: 60s
timeout: 5s
retries: 12
start_period: 10s
我只想启动redis服务,所以我尝试了这个命令
docker-compose -f docker-compose.yml up -d redis50_cluster
但是它失败了,因为
ERROR: Couldn't find env file: /Users/antkong/work/production/local/docker/dynamodb/local.env
我真的不关心 dynamodb 并且不想通过它的设置。
是否可以要求docker-compose
忽略 yml 文件其他部分中的错误?