File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ impl SystemChecks {
2727 }
2828 pub async fn run_all ( & self ) -> CheckGroupResult {
2929 let results = join_all ( [
30+ self . not_snap_docker ( ) . boxed ( ) ,
3031 self . enough_memory ( ) . boxed ( ) ,
3132 self . enough_disk ( "/usr" . into ( ) , MINIMUM_DISK_GENERAL )
3233 . boxed ( ) ,
@@ -60,6 +61,24 @@ impl SystemChecks {
6061 }
6162 }
6263
64+ async fn not_snap_docker ( & self ) -> CheckResult {
65+ let name = String :: from ( "Supported Docker Runtime" ) ;
66+ let is_snap = std:: fs:: read_to_string ( "/proc/self/mountinfo" )
67+ . map ( |c| c. contains ( "snap/docker" ) )
68+ . unwrap_or ( false ) ;
69+
70+ if is_snap {
71+ CheckResult :: new (
72+ & name,
73+ Errored (
74+ "Docker is running as a snap: hosts with snap-managed Docker runtimes are not supported installation targets" . into ( ) ,
75+ ) ,
76+ )
77+ } else {
78+ CheckResult :: new ( & name, Passed )
79+ }
80+ }
81+
6382 /// Checks that the `nft` binary, typically from the `nftables` package,
6483 /// is in PATH. Currently, the installer and `protect-network` rely on this.
6584 async fn has_nft_bin ( & self ) -> CheckResult {
You can’t perform that action at this time.
0 commit comments