From 8793efcc169f4cea4849ceee3d40fb7282439d19 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Tue, 31 Jan 2017 10:49:06 +0100 Subject: Add SNAP support when finding Docker images folder Closes-bug: #1665265 Change-Id: I046a93de72666eae11cb88eb4577c97935f72520 --- kolla/image/build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kolla/image/build.py b/kolla/image/build.py index 3e8058f07..494bff579 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -539,7 +539,12 @@ class KollaWorker(object): possible_paths = ( PROJECT_ROOT, os.path.join(sys.prefix, 'share/kolla'), - os.path.join(sys.prefix, 'local/share/kolla')) + os.path.join(sys.prefix, 'local/share/kolla'), + # NOTE(zioproto): When Kolla is used within a snap, the env var + # $SNAP is the directory where the snap is mounted. + # https://github.com/openstack/snap-kolla + # More info in snap packages https://snapcraft.io + os.path.join(os.environ.get('SNAP', ''), 'share/kolla')) for path in possible_paths: image_path = os.path.join(path, 'docker') -- cgit v1.2.3