I'm trying to pass this variable : REGION={'code': 44, 'name': 'grand_est', 'pretty_name': 'Grand Est'}
to docker run.
The exact command is:
docker run \
-e "REGION={'code': 44, 'name': 'grand_est', 'pretty_name': 'Grand Est'}" \
meteocovid
But I get the error:
docker: invalid reference format.
I can't split the variable REGION into separated variable because the docker container needs it in this exact format and I can't rebuild the variable within the container.
Does anyone have an idea?
Try this instead:
docker run \
-e REGION="{'code': 44, 'name': 'grand_est', 'pretty_name': 'Grand Est'}" \
meteocovid
You are now passing a string of the "object" which you can then parse in whatever language you're using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With