diff options
author | Christian Breunig <christian@breunig.cc> | 2023-11-27 06:44:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 06:44:14 +0100 |
commit | c0fbe890be6a5a744d7199ef4f0b8ce21acdd006 (patch) | |
tree | 2ca72335e2878900bbf6f2ccdf273cfaa733feff /python/vyos/system/image.py | |
parent | c64a8a4da7dba72a42493a58e3ce235c65b258e8 (diff) | |
parent | 0b97bde2cb04cf5e23350798f972abcee4bfe4ee (diff) | |
download | vyos-1x-c0fbe890be6a5a744d7199ef4f0b8ce21acdd006.tar.gz vyos-1x-c0fbe890be6a5a744d7199ef4f0b8ce21acdd006.zip |
Merge pull request #2543 from jestabro/check-in-docker
image-tools: T4516: exit grub-update service if running in docker
Diffstat (limited to 'python/vyos/system/image.py')
-rw-r--r-- | python/vyos/system/image.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/system/image.py b/python/vyos/system/image.py index 6c4e3bba5..c03ce02d5 100644 --- a/python/vyos/system/image.py +++ b/python/vyos/system/image.py @@ -261,3 +261,8 @@ def is_live_boot() -> bool: if boot_type == 'live': return True return False + +def is_running_as_container() -> bool: + if Path('/.dockerenv').exists(): + return True + return False |