From 076a611bf14bd482c1b7ac5e778a5e094ac3797e Mon Sep 17 00:00:00 2001
From: Ayush Singh <ayushdevel1325@gmail.com>
Date: Fri, 1 Dec 2023 01:03:47 +0530
Subject: [PATCH] Add podman support to docker-build-env

- Also expose port 8000 for http.server
- Add selinux labels (z)

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
---
 docker-build-env.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/docker-build-env.sh b/docker-build-env.sh
index 53cd6b1a..529dba22 100755
--- a/docker-build-env.sh
+++ b/docker-build-env.sh
@@ -1,2 +1,14 @@
 #!/bin/bash
-docker run --rm -it -v $(pwd):/build/docs.beagleboard.org:rw beagle/sphinx-build-env /bin/bash
+
+if command -v docker &> /dev/null
+then
+	CONTAINER_RUNTIME=docker
+elif command -v podman &> /dev/null
+then
+	CONTAINER_RUNTIME=podman
+else
+	echo "Failed to find docker or podman"
+	exit 1
+fi
+
+$CONTAINER_RUNTIME run --rm -it -v $(pwd):/build/docs.beagleboard.org:rw,z -p 8000:8000 beagle/sphinx-build-env /bin/bash
-- 
GitLab