Docker create .env file array variable
Im using docker-compose and Im using env file with my local variables. I need to pass an array variable. I tried:
TAGS="12345","67890"
or
TAGS=["12345","67890"]
or
TAGS=("12345" "67890")
I always get the error:
List(WrongType(STRING,Set(LIST, OBJECT),Some(ConfigValueLocation(file:/src/target/scala-2.12/classes/application.conf,86))
Any idea how to achieve this?
+3
source to share
1 answer
Like Confidence mentioned above, write a comma separated line:
TAGS=12345,67890
Then in your application (like Python):
os.getenv('TAGS').split(',')
+3
source to share