Skip to content

Commit 4eed3d8

Browse files
committed
Replace import_image
1 parent b2af2f7 commit 4eed3d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

buildrunner/docker/importer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
with the terms of the Adobe license agreement accompanying it.
77
"""
88

9+
import python_on_whales
910
import yaml
1011

1112
import docker
1213
import docker.errors
1314

15+
from buildrunner.config import BuildRunnerConfig
1416
from buildrunner.docker import new_client
1517
from buildrunner.errors import BuildRunnerProcessingError
1618
from buildrunner.utils import is_dict
@@ -41,7 +43,11 @@ def import_image(self):
4143
"""
4244

4345
try:
44-
import_return = self.docker_client.import_image(self.src)
46+
import_return = None
47+
if BuildRunnerConfig.get_instance().run_config.use_legacy_builder:
48+
import_return = self.docker_client.import_image(self.src)
49+
else:
50+
import_return = python_on_whales.docker.import_(self.src)
4551
except docker.errors.APIError as apie:
4652
raise BuildRunnerProcessingError(
4753
f"Error importing image from archive file {self.src}: {apie}"

0 commit comments

Comments
 (0)