Skip to content

Commit 892ec7c

Browse files
committed
Allow bypassing overlayfs check
1 parent 1f56e74 commit 892ec7c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/UserNamespaces.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ function check_overlayfs_loaded(;verbose::Bool = false)
102102
return false
103103
end
104104

105+
# If the user has disabled this check, return `true`
106+
if parse(Bool, get(ENV, "SANDBOX_SKIP_OVERLAYFS_CHECK", "false"))
107+
return true
108+
end
109+
105110
mods = get_loaded_modules()
106111
if verbose
107112
@info("Found $(length(mods)) loaded modules")
@@ -111,7 +116,7 @@ function check_overlayfs_loaded(;verbose::Bool = false)
111116
return name == "overlay"
112117
end
113118
if isempty(mods)
114-
@warn("Could not find loaded `overlay` module, try `sudo modprobe overlay`?")
119+
@warn("Could not find loaded `overlay` module, try `sudo modprobe overlay` or export SANDBOX_SKIP_OVERLAYFS_CHECK=true to disable this check!")
115120
return false
116121
end
117122

0 commit comments

Comments
 (0)