mirror of
https://github.com/DomiStyle/docker-idrac6.git
synced 2024-12-23 06:16:22 +01:00
Add support for a custom VNC port
This commit is contained in:
parent
c4d2330562
commit
2c35a02a95
@ -2,6 +2,7 @@ FROM jlesage/baseimage-gui:debian-11
|
||||
|
||||
ENV APP_NAME="iDRAC 6" \
|
||||
IDRAC_PORT=443 \
|
||||
IDRAC_VNC_PORT=5900 \
|
||||
DISPLAY_WIDTH=801 \
|
||||
DISPLAY_HEIGHT=621
|
||||
|
||||
|
15
startapp.sh
15
startapp.sh
@ -26,6 +26,11 @@ if [ -f "/run/secrets/idrac_password" ]; then
|
||||
IDRAC_PASSWORD="$(cat /run/secrets/idrac_password)"
|
||||
fi
|
||||
|
||||
if [ -f "/run/secrets/idrac_vnc_port" ]; then
|
||||
echo "Using Docker secret for IDRAC_VNC_PORT"
|
||||
IDRAC_VNC_PORT="$(cat /run/secrets/idrac_vnc_port)"
|
||||
fi
|
||||
|
||||
if [ -z "${IDRAC_HOST}" ]; then
|
||||
echo "${RED}Please set a proper idrac host with IDRAC_HOST${NC}"
|
||||
sleep 2
|
||||
@ -50,6 +55,12 @@ if [ -z "${IDRAC_PASSWORD}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${IDRAC_VNC_PORT}" ]; then
|
||||
echo "${RED}Please set a proper idrac VNC port with IDRAC_VNC_PORT${NC}"
|
||||
sleep 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Environment ok"
|
||||
|
||||
cd /app
|
||||
@ -118,8 +129,8 @@ if [ -n "$IDRAC_KEYCODE_HACK" ]; then
|
||||
|
||||
export LD_PRELOAD=/keycode-hack.so
|
||||
fi
|
||||
exec java -cp avctKVM.jar -Djava.library.path="./lib" com.avocent.idrac.kvm.Main ip=${IDRAC_HOST} kmport=5900 vport=5900 user=${IDRAC_USER} passwd=${IDRAC_PASSWORD} apcp=1 version=2 vmprivilege=true "helpurl=https://${IDRAC_HOST}:443/help/contents.html" &
|
||||
exec java -cp avctKVM.jar -Djava.library.path="./lib" com.avocent.idrac.kvm.Main ip=${IDRAC_HOST} kmport=${IDRAC_VNC_PORT} vport=${IDRAC_VNC_PORT} user=${IDRAC_USER} passwd=${IDRAC_PASSWORD} apcp=1 version=2 vmprivilege=true "helpurl=https://${IDRAC_HOST}:${IDRAC_PORT}/help/contents.html" &
|
||||
|
||||
# If an iso exists at the specified location, mount it
|
||||
[ -f "/vmedia/$VIRTUAL_ISO" ] && /mountiso.sh
|
||||
wait
|
||||
wait
|
||||
|
Loading…
Reference in New Issue
Block a user