Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java is no longer version 7 --it's 8! ꦲ ꦲ ꦲ ꦲ
- Loading branch information
1 parent
f03a986
commit ef83879
Showing
11 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
echo "\n\n\n ***** This script will install additional program \n ***** to enable X11 Forwarding in Mac. " | ||
echo " ***** Docker will need to be downloaded and installed from Docker Website \n\n\n" | ||
|
||
# Install Home Brew | ||
echo "Installing Homebrew" | ||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
brew update | ||
|
||
# With home brew installed, install xquartz | ||
echo "Installing XQuartz" | ||
brew install Caskroom/cask/xquartz | ||
|
||
# With home brew installed, install socat | ||
echo "Installing Socat" | ||
brew install socat | ||
|
||
echo "\n\n\n ***** Now please download and install Docker Toolbox from Docker Website ***** " | ||
echo " ***** https://www.docker.com/toolbox ***** \n\n\n" | ||
open "https://www.docker.com/toolbox" & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
|
||
# The IP address is the Mac IP Brigde IP Address. | ||
# Use command: | ||
# VBoxManage list bridgedifs | ||
# if you are unsure about the address. | ||
|
||
export MacIP="192.168.99.1" | ||
export DockerMachine=$(docker-machine ls | awk 'FNR == 2 {print $1}') | ||
|
||
# This script works with other Docker Images. | ||
if [ $# -eq 0 ] | ||
then | ||
export DockerImage="kristiyanto/guidock" | ||
else | ||
export DockerImage=$1 | ||
fi | ||
|
||
|
||
# Look for available Docker Machine. | ||
if [ -z $DockerMachine ] | ||
then | ||
echo "Docker Machine is not found. Please check if Docker is properly Installed." | ||
echo "Script will now exit." | ||
exit 1 | ||
else | ||
echo Launching $DockerImage on $DockerMachine | ||
fi | ||
|
||
# Script starts here --- | ||
docker-machine start $DockerMachine | ||
echo "Launching Socat to bind X11 services to port 6000." | ||
|
||
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" & > /dev/null | ||
|
||
echo "Launching XQuartz" | ||
open -a xquartz & | ||
echo "Setting up environtment" | ||
eval $(docker-machine env $DockerMachine) | ||
docker pull $DockerImage | ||
docker run -ti -e DISPLAY=$MacIP:0 -e JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ $DockerImage |
Binary file renamed
BIN
+335 KB
Install and Run /WINDOWS/GUIdock-Win.zip → ... and Run /WINDOWS/GUIdock for Windows.zip
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
Install and Run /WINDOWS/GUIdock for Windows/.goutputstream-WSI74X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
IMAGE="kristiyanto/guidock" | ||
trap '[ "$?" -eq 0 ] || read -p "Looks like something went wrong... Press any key to continue..."' EXIT | ||
WD=`pwd` | ||
cd "/c/Program Files/Docker Toolbox" | ||
|
||
echo "$WD" | ||
|
||
VM=default | ||
DOCKER_MACHINE=./docker-machine.exe | ||
VBOXMANAGE=/$(reg query HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle\\VirtualBox //v InstallDir | grep InstallDir | awk '{print substr($0, index($0,$3))}' | sed 's/\\/\//g' | sed 's/://')VBoxManage.exe | ||
MOBAXTERM="/c/Program Files (x86)/Mobatek/MobaXterm Personal Edition/MobaXterm.exe" | ||
BATCH="$WD/startMoba.bat" | ||
echo "Virtual Box Path is $VBOXMANAGE" | ||
|
||
if [ ! -f $DOCKER_MACHINE ] || [ ! -f "${VBOXMANAGE}" ]; then | ||
echo "Either VirtualBox or Docker Machine are not installed. Please re-run the Toolbox Installer and try again." | ||
exit 1 | ||
fi | ||
|
||
"${VBOXMANAGE}" showvminfo $VM &> /dev/null | ||
VM_EXISTS_CODE=$? | ||
|
||
set -e | ||
|
||
if [ $VM_EXISTS_CODE -eq 1 ]; then | ||
echo "Creating Machine $VM..." | ||
$DOCKER_MACHINE rm -f $VM &> /dev/null || : | ||
rm -rf ~/.docker/machine/machines/$VM | ||
$DOCKER_MACHINE create -d virtualbox --virtualbox-memory 2048 $VM | ||
else | ||
echo "Machine $VM already exists in VirtualBox." | ||
fi | ||
|
||
echo "Starting machine $VM..." | ||
$DOCKER_MACHINE start $VM | ||
|
||
echo "Setting environment variables for machine $VM..." | ||
eval "$($DOCKER_MACHINE env --shell=bash $VM)" | ||
|
||
clear | ||
VBOXHOST=`"${VBOXMANAGE}" showvminfo default | grep 'VirtualBox Host-Only' | sed -n " s,[^']*'\([^']*\).*,\1,p " | sed "s/Ethernet Adapter/Network/"` | ||
echo "$VBOXHOST" | ||
MYCMD="netsh interface ip show addresses \""$VBOXHOST"\"" | ||
echo "Finding VBoxIP $MYCMD" | ||
TMP=`$MYCMD | grep IP` | ||
VBIP=`echo $TMP | awk '{print \$3}'` | ||
echo "VBoxIP is $VBIP" | ||
DOCKERIP=`docker-machine ip $VM` | ||
$BATCH $DOCKERIP $VBIP $IMAGE& | ||
exit 0 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
To run double click on RunGUIdock.sh | ||
Both the docker toolbox and MobaXterm must be installed and the machine restarted before the script is run the first time |
65 changes: 65 additions & 0 deletions
65
Install and Run /WINDOWS/GUIdock for Windows/RunGUIdock.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
#Version Hong Hung 9/14/2015 | ||
#based on Docker start.sh | ||
|
||
#Customize Image here | ||
IMAGE="kristiyanto/guidock" | ||
|
||
#Flag errors - from original | ||
trap '[ "$?" -eq 0 ] || read -p "Looks like something went wrong... Press any key to continue..."' EXIT | ||
|
||
#Save current working directory | ||
WD=`pwd` | ||
|
||
#Change this if Docker files are stored elsewhere | ||
cd "/c/Program Files/Docker Toolbox" | ||
|
||
#Mostly from original docker script | ||
VM=default | ||
DOCKER_MACHINE=./docker-machine.exe | ||
VBOXMANAGE=/$(reg query HKEY_LOCAL_MACHINE\\SOFTWARE\\Oracle\\VirtualBox //v InstallDir | grep InstallDir | awk '{print substr($0, index($0,$3))}' | sed 's/\\/\//g' | sed 's/://')VBoxManage.exe | ||
|
||
MOBAXTERM="/c/Program Files (x86)/Mobatek/MobaXterm Personal Edition/MobaXterm.exe" | ||
BATCH="$WD/startMoba.bat" | ||
echo "Virtual Box Path is $VBOXMANAGE" | ||
|
||
if [ ! -f $DOCKER_MACHINE ] || [ ! -f "${VBOXMANAGE}" ]; then | ||
echo "Either VirtualBox or Docker Machine are not installed. Please re-run the Toolbox Installer and try again." | ||
exit 1 | ||
fi | ||
|
||
"${VBOXMANAGE}" showvminfo $VM &> /dev/null | ||
VM_EXISTS_CODE=$? | ||
|
||
set -e | ||
|
||
if [ $VM_EXISTS_CODE -eq 1 ]; then | ||
echo "Creating Machine $VM..." | ||
$DOCKER_MACHINE rm -f $VM &> /dev/null || : | ||
rm -rf ~/.docker/machine/machines/$VM | ||
$DOCKER_MACHINE create -d virtualbox --virtualbox-memory 2048 $VM | ||
else | ||
echo "Machine $VM already exists in VirtualBox." | ||
fi | ||
|
||
echo "Starting machine $VM..." | ||
$DOCKER_MACHINE start $VM | ||
|
||
echo "Setting environment variables for machine $VM..." | ||
eval "$($DOCKER_MACHINE env --shell=bash $VM)" | ||
clear | ||
|
||
#This code is to find the Virtual Box IP for VM default | ||
VBOXHOST=`"${VBOXMANAGE}" showvminfo default | grep 'VirtualBox Host-Only' | sed -n " s,[^']*'\([^']*\).*,\1,p " | sed "s/Ethernet Adapter/Network/"` | ||
echo "$VBOXHOST" | ||
MYCMD="netsh interface ip show addresses \""$VBOXHOST"\"" | ||
echo "Finding VBoxIP $MYCMD" | ||
TMP=`$MYCMD | grep IP` | ||
VBIP=`echo $TMP | awk '{print \$3}'` | ||
echo "VBoxIP is $VBIP" | ||
DOCKERIP=`docker-machine ip $VM` | ||
|
||
#Run the bat script to run MobaXterm because of all the escaping necessary otherwise | ||
$BATCH $DOCKERIP $VBIP -e JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ $IMAGE& | ||
clear | ||
exit 0 |
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
Install and Run /WINDOWS/GUIdock for Windows/startMoba.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
REM This file starts up MobaXterm | ||
REM Hong Hung 9-14-2015 | ||
@echo off | ||
|
||
FOR /F "delims=" %%i in ('where /R "C:\Program Files (x86)" MobaXterm') do set Moba=%%i | ||
echo Docker IP Address is: %1 | ||
echo VirtualBox IP Address is: %2 | ||
echo Dockerfile or Image is: %3 | ||
echo MobaXterm binary is %Moba% | ||
start "" "%Moba%" -exitwhendone -exec "sshpass -p tcuser ssh docker@%1 'docker run -t -e DISPLAY=%2:0 %3'" |