Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Startup Issues #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ idrac_host.txt
idrac_password.txt
idrac_user.txt
idrac_port.txt
.idea
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ RUN APP_ICON_URL=https://raw.githubusercontent.com/DomiStyle/docker-idrac6/maste
install_app_icon.sh "$APP_ICON_URL"

RUN apt-get update && \
apt-get install -y wget software-properties-common libx11-dev gcc xdotool && \
wget -nc https://cdn.azul.com/zulu/bin/zulu7.52.0.11-ca-jdk7.0.332-linux_amd64.deb && \
apt-get install -y ./zulu7.52.0.11-ca-jdk7.0.332-linux_amd64.deb && \
apt-get install -y wget software-properties-common libx11-dev gcc xdotool curl && \
wget -nc https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.deb && \
apt-get install -y ./amazon-corretto-8-x64-linux-jdk.deb && \
gcc -o /keycode-hack.so /keycode-hack.c -shared -s -ldl -fPIC && \
apt-get remove -y gcc software-properties-common && \
apt-get autoremove -y && \
Expand All @@ -23,7 +23,7 @@ RUN apt-get update && \
RUN mkdir /app && \
chown ${USER_ID}:${GROUP_ID} /app

RUN perl -i -pe 's/^(\h*jdk\.tls\.disabledAlgorithms\h*=\h*)([\w.\h<>\n\\,]*)(TLSv1[,\n\h]\h*)/$1$2/m' /usr/lib/jvm/zulu-7-amd64/jre/lib/security/java.security
RUN perl -i -pe 's/^(\h*jdk\.tls\.disabledAlgorithms\h*=\h*)([\w.\h<>\n\\,]*)(TLSv1[,\n\h]\h*)/$1$2/m' /usr/lib/jvm/java-1.8.0-amazon-corretto/jre/lib/security/java.security

COPY startapp.sh /startapp.sh
COPY mountiso.sh /mountiso.sh
Expand Down
16 changes: 10 additions & 6 deletions startapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'

_curl() {
curl --verbose --insecure --ciphers 'DEFAULT:!DH' "$@"
}

echo "Starting"

if [ -f "/run/secrets/idrac_host" ]; then
Expand Down Expand Up @@ -52,7 +56,7 @@ fi

echo "Environment ok"

cd /app
cd /app || exit

if [ ! -d "lib" ]; then
echo "Creating library folder"
Expand All @@ -62,7 +66,7 @@ fi
if [ ! -f avctKVM.jar ]; then
echo "Downloading avctKVM"

wget https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctKVM.jar --no-check-certificate
_curl -o avctKVM.jar https://"${IDRAC_HOST}":"${IDRAC_PORT}"/software/avctKVM.jar

if [ ! $? -eq 0 ]; then
echo "${RED}Failed to download avctKVM.jar, please check your settings${NC}"
Expand All @@ -74,7 +78,7 @@ fi
if [ ! -f lib/avctKVMIOLinux64.jar ]; then
echo "Downloading avctKVMIOLinux64"

wget -O lib/avctKVMIOLinux64.jar https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctKVMIOLinux64.jar --no-check-certificate
_curl -o lib/avctKVMIOLinux64.jar https://"${IDRAC_HOST}":"${IDRAC_PORT}"/software/avctKVMIOLinux64.jar

if [ ! $? -eq 0 ]; then
echo "${RED}Failed to download avctKVMIOLinux64.jar, please check your settings${NC}"
Expand All @@ -86,7 +90,7 @@ fi
if [ ! -f lib/avctVMLinux64.jar ]; then
echo "Downloading avctVMLinux64"

wget -O lib/avctVMLinux64.jar https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctVMLinux64.jar --no-check-certificate
_curl -o lib/avctVMLinux64.jar https://"${IDRAC_HOST}":"${IDRAC_PORT}"/software/avctVMLinux64.jar

if [ ! $? -eq 0 ]; then
echo "${RED}Failed to download avctVMLinux64.jar, please check your settings${NC}"
Expand All @@ -95,7 +99,7 @@ if [ ! -f lib/avctVMLinux64.jar ]; then
fi
fi

cd lib
cd lib || exit

if [ ! -f lib/avctKVMIOLinux64.so ]; then
echo "Extracting avctKVMIOLinux64"
Expand All @@ -109,7 +113,7 @@ if [ ! -f lib/avctVMLinux64.so ]; then
jar -xf avctVMLinux64.jar
fi

cd /app
cd /app || exit

echo "${GREEN}Initialization complete, starting virtual console${NC}"

Expand Down