When I set up a couple of Docker containers in docker-compose.yaml file with links, the name of the containers ends up being of the format prefix_%s_1
docker-compose.yaml
prefix_%s_1
You could just set container name to what you want via container_name:
container_name
redis: build: ../storage/redis container_name: redis ports: - "6379:6379"
And container hostname could also be set via hostname.
hostname