Enhance Dockerfile and entrypoint script for Kerberos initialization
- Added krb5-admin-server and updated entrypoint to ensure proper initialization of the Kerberos realm. - Improved error handling for required environment variables in entrypoint script. - Updated README with additional prerequisites and client configuration instructions. - Modified env.example to remove default passwords for security. - Enhanced run-container script to set container hostname based on KDC_HOST.
This commit is contained in:
@@ -3,8 +3,16 @@
|
||||
set -e
|
||||
|
||||
if command -v container >/dev/null 2>&1; then
|
||||
ENV_FILE=~/app-data/kerberos/kerberos.env
|
||||
KDC_HOST=$(grep -E '^KRB5_KDC_HOST=' "${ENV_FILE}" | cut -d= -f2-)
|
||||
if [ -z "${KDC_HOST}" ]; then
|
||||
echo "Error: KRB5_KDC_HOST is not set in ${ENV_FILE}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
container run -d --name kerberos \
|
||||
--env-file ~/app-data/kerberos/kerberos.env \
|
||||
--hostname "${KDC_HOST}" \
|
||||
--env-file "${ENV_FILE}" \
|
||||
-v kerberos_data:/var/lib/krb5kdc \
|
||||
-p 88:88/tcp -p 88:88/udp \
|
||||
-p 464:464/tcp -p 464:464/udp \
|
||||
|
||||
Reference in New Issue
Block a user