diff options
| author | Saverio Proto <saverio.proto@switch.ch> | 2017-01-31 10:49:06 +0100 |
|---|---|---|
| committer | Saverio Proto <saverio.proto@switch.ch> | 2017-02-16 19:49:31 +0100 |
| commit | 8793efcc169f4cea4849ceee3d40fb7282439d19 (patch) | |
| tree | 0bec058b930d22c2397846576918599f145c1a6b | |
| parent | 40130b2e7a591931ddac366dc6f8d085e1f83e37 (diff) | |
| download | kolla-8793efcc169f4cea4849ceee3d40fb7282439d19.tar.gz kolla-8793efcc169f4cea4849ceee3d40fb7282439d19.zip | |
Add SNAP support when finding Docker images folder
Closes-bug: #1665265
Change-Id: I046a93de72666eae11cb88eb4577c97935f72520
| -rwxr-xr-x | kolla/image/build.py | 7 |
1 files changed, 6 insertions, 1 deletions
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') |
