Make run-container.sh executable and ensure container command availability
This commit is contained in:
16
scripts/run-container.sh
Normal file → Executable file
16
scripts/run-container.sh
Normal file → Executable 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
|
||||
Reference in New Issue
Block a user