Make run-container.sh executable and ensure container command availability

This commit is contained in:
2026-05-04 19:59:55 +02:00
parent 67a78649ba
commit 2fabe99d72

16
scripts/run-container.sh Normal file → Executable file
View File

@@ -2,3 +2,19 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if command -v container >/dev/null 2>&1; then
container run -d --name ldap \
--env-file ~/app-data/openldap/openldap.env \
-v openldap_data:/var/lib/ldap \
-v openldap_slapd:/etc/ldap/slapd.d \
-v ~/app-data/openldap/certs:/etc/ldap/certs:ro \
-v ~/app-data/openldap/accounts:/bootstrap/accounts:ro \
-v ~/app-data/openldap/backups:/var/backups:rw \
-p 389:389 -p 636:636 \
openldap:latest
else
echo "Error: 'container' command not found. Please install the 'container' CLI tool." >&2
exit 1
fi