@@ -47,7 +47,7 @@ def docker_compose_cm(
4747
4848def dump_docker_compose_logs (context , docker_compose_yml ):
4949 env = os .environ .copy ()
50- env ["DOCKER_API_VERSION" ] = "1.41 "
50+ env ["DOCKER_API_VERSION" ] = "1.44 "
5151 if context :
5252 compose_command = ["docker" , "--context" , context , "compose" ]
5353 else :
@@ -91,7 +91,7 @@ def docker_compose(docker_compose_cm):
9191
9292def docker_compose_up (docker_compose_yml , context , service , env_file , no_build : bool = False ):
9393 docker_env = os .environ .copy ()
94- docker_env ["DOCKER_API_VERSION" ] = "1.41 "
94+ docker_env ["DOCKER_API_VERSION" ] = "1.44 "
9595 if context :
9696 compose_command = ["docker" , "--context" , context , "compose" ]
9797 else :
@@ -118,7 +118,7 @@ def docker_compose_up(docker_compose_yml, context, service, env_file, no_build:
118118
119119def docker_compose_down (docker_compose_yml , context , service , env_file ):
120120 docker_env = os .environ .copy ()
121- docker_env ["DOCKER_API_VERSION" ] = "1.41 "
121+ docker_env ["DOCKER_API_VERSION" ] = "1.44 "
122122 if context :
123123 compose_command = ["docker" , "--context" , context , "compose" ]
124124 else :
@@ -145,7 +145,7 @@ def docker_compose_down(docker_compose_yml, context, service, env_file):
145145def list_containers ():
146146 # TODO: Handle default container names: {project_name}_service_{task_number}
147147 env = os .environ .copy ()
148- env ["DOCKER_API_VERSION" ] = "1.41 "
148+ env ["DOCKER_API_VERSION" ] = "1.44 "
149149 return (
150150 subprocess .check_output (["docker" , "ps" , "--format" , "{{.Names}}" ], env = env )
151151 .decode ()
@@ -156,7 +156,7 @@ def list_containers():
156156def current_container ():
157157 container_id = subprocess .check_output (["cat" , "/etc/hostname" ]).strip ().decode ()
158158 env = os .environ .copy ()
159- env ["DOCKER_API_VERSION" ] = "1.41 "
159+ env ["DOCKER_API_VERSION" ] = "1.44 "
160160 container = (
161161 subprocess .check_output (
162162 ["docker" , "ps" , "--filter" , f"id={ container_id } " , "--format" , "{{.Names}}" ], env = env
@@ -171,7 +171,7 @@ def connect_container_to_network(container, network):
171171 # subprocess.run instead of subprocess.check_call so we don't fail when
172172 # trying to connect a container to a network that it's already connected to
173173 env = os .environ .copy ()
174- env ["DOCKER_API_VERSION" ] = "1.41 "
174+ env ["DOCKER_API_VERSION" ] = "1.44 "
175175 try :
176176 subprocess .check_call (["docker" , "network" , "connect" , network , container ], env = env )
177177 logging .info (f"Connected { container } to network { network } ." )
@@ -181,7 +181,7 @@ def connect_container_to_network(container, network):
181181
182182def disconnect_container_from_network (container , network ):
183183 env = os .environ .copy ()
184- env ["DOCKER_API_VERSION" ] = "1.41 "
184+ env ["DOCKER_API_VERSION" ] = "1.44 "
185185 try :
186186 subprocess .check_call (["docker" , "network" , "disconnect" , network , container ], env = env )
187187 logging .info (f"Disconnected { container } from network { network } ." )
@@ -191,7 +191,7 @@ def disconnect_container_from_network(container, network):
191191
192192def hostnames (network ):
193193 env = os .environ .copy ()
194- env ["DOCKER_API_VERSION" ] = "1.41 "
194+ env ["DOCKER_API_VERSION" ] = "1.44 "
195195 hostnames = {}
196196 for container in list_containers ():
197197 output = subprocess .check_output (["docker" , "inspect" , container ], env = env )
0 commit comments