I would like to pass an environment variable named ABC:DEF
to a container defined in a docker-compose.yml
.
How to do it?
If I write in a service definition
environment:
ABC:DEF: ${ABC:DEF}
I got
ERROR: Invalid interpolation format for "environment" option in service: "${ABC:DEF}"
Edit: The goal of this question is to understand whether it is possible to use environment variables names which contain a :
colon and how to properly define that in docker-compose.yml
. A discussion what are the alternatives to using the :
colon from the view of the "thing" running inside the affected container is not part of the question.