I'm developing an application that creates a container and runs it, using a docker image.
I create the client using this snippet:
client = docker.DockerClient(base_url='unix://var/run/docker.sock', version='1.41', timeout=10)
and it's fine.
I instantiate and run the image properly using this:
client.containers.run(image=deployment_json['container_image'], command="sbt run", environment=cfg)
The environment parameter does not lead into error, and the container runs fine, but the image doesn't retrieve the environment variable (NullPointer, it's a Scala app)
the cfg is created like this: cfg = ['var_name', str(env)] where env is a json object.
Using docker lib version 5.0.0.
What am I missing? How do i give environment variables to docker images?
envcontain?