regisg
regisg

Reputation: 158

Setting the Docker's container environnement (Env) via the docker remote api

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

Answers (1)

quinn
quinn

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

Related Questions