From b76d98748553fd8a4ecbd93e8f0167187aa22e9b Mon Sep 17 00:00:00 2001 From: Janosch <99879757+jkppr@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:54:44 -0700 Subject: [PATCH] Improve docker check Using `which image_export.py` instead of `ls /.dockerenv` allows to check for what is actually relevant: Is there a local image_export version available or does HashR need to use a docker container. This change enables running HashR on GKE for example. --- processors/local/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processors/local/local.go b/processors/local/local.go index 7185d76..9b5d31c 100644 --- a/processors/local/local.go +++ b/processors/local/local.go @@ -77,6 +77,6 @@ func (p *Processor) ImageExport(sourcePath string) (string, error) { } func inDockerContainer() bool { - _, err := shellCommand("ls", "/.dockerenv") + _, err := shellCommand("which", "image_export.py") return err == nil }