version: '3.4'
services:
redis: &redis
image: docker.io/redis:7-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file: redis.env
volumes:
- redis-data:/data
redis-cache:
<<: *redis
env_file: redis-cache.env
volumes:
- redis-cache-data:/data
volumes:
redis-cache-data:
driver: local
redis-data:
driver: local
Error
$
Error:
0: File `docker-compose.yaml` is not a valid compose file
1: services.redis-cache: unknown attribute "<<", extensions must start with 'x-' (see https://docs.docker.com/compose/compose-file/#extension) at line 15 column 5
Location:
src/cli/compose.rs:61
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Hello,
It would be good to add YAML anchors support.
Example
Error
Version
podlet 0.2.4