diff --git a/packages/tray_manager/lib/src/helpers/sandbox.dart b/packages/tray_manager/lib/src/helpers/sandbox.dart index ab75ce3..602c42d 100644 --- a/packages/tray_manager/lib/src/helpers/sandbox.dart +++ b/packages/tray_manager/lib/src/helpers/sandbox.dart @@ -1,7 +1,9 @@ import 'dart:io'; -/// Returns `true` if the app is running in a sandbox, eg. Flatpak or Snap. +/// Returns `true` if the app is running in a sandbox, eg. Flatpak, Snap, Docker, Podman. bool runningInSandbox() { return Platform.environment.containsKey('FLATPAK_ID') || - Platform.environment.containsKey('SNAP'); + Platform.environment.containsKey('SNAP') || + (Platform.environment['container']?.isNotEmpty == true) || + FileSystemEntity.isFileSync('/.dockerenv'); }