How to overwrite environment variables inside container after creation with remote API? I see no such option in container update method description. But docker itself is doing that when linking containers (source) to provide port and host variables:
DB_PORT_5432_TCP_PORT=5432
DB_PORT_5432_TCP_ADDR=172.17.0.5
...
I need to provide the same variables of other infrastructure elements which are not managed by docker. And each time I run a container this variables could be different.
I think it should look like:
- initialize container's dependencies.
- Create container itself.
- Run container's dependencies.
- Get dependencies parameters (IP, ports, etc).
- Configure container environment (as I thought with container update).
- Run container.
Steps from 3 to 6 could be repeated many times for one instance.