Reputation: 158
I'm using dockerode to manage docker by the remote api. Everything works fine except that I can't figure how to set the environnement when I create the container.
The docker doc doesn't give any information about the Env post parameter format.
I tried {Env: ["foo=bar","fii:boo"], ... } {Env: {"foo":"bar","fii":"boo"}, ... } without success.
Does anyone know how to achieve this ?
Upvotes: 4
Views: 962
Reputation: 5998
The correct format is like:
"Env":["KEY=value", "ANOTHER=value"]
If it isn't working for you there is probably another issue there.
Upvotes: 4