diff options
Diffstat (limited to 'kolla/common/utils.py')
| -rw-r--r-- | kolla/common/utils.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kolla/common/utils.py b/kolla/common/utils.py index 4ee80768f..485848ba2 100644 --- a/kolla/common/utils.py +++ b/kolla/common/utils.py @@ -54,6 +54,21 @@ def make_a_logger(conf=None, image_name=None): LOG = make_a_logger() +def check_docker_buildx(): + try: + subprocess.check_output( # nosec + ['docker', 'buildx', 'version'], stderr=subprocess.STDOUT) + except OSError as ex: + if ex.errno == 2: + LOG.error('"docker" command is not found.') + raise + except subprocess.CalledProcessError: + LOG.error('"docker buildx" is not available. ' + 'Install the docker-buildx-plugin or disable BuildKit ' + 'with "--nobuildkit".') + raise + + def get_docker_squash_version(): try: |
