mirror of https://github.com/docker/docs.git
Fixing migration on windows 7, adding Kitematic as files instead of a separate installer
This commit is contained in:
parent
de986d82af
commit
8969ff80c6
|
|
@ -2,7 +2,7 @@
|
||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
#define MyAppName "Docker Toolbox"
|
#define MyAppName "Docker Toolbox"
|
||||||
#define MyAppVersion "1.8.0-rc5"
|
#define MyAppVersion "1.8.0-rc7"
|
||||||
#define MyAppPublisher "Docker"
|
#define MyAppPublisher "Docker"
|
||||||
#define MyAppURL "https://docker.com"
|
#define MyAppURL "https://docker.com"
|
||||||
#define MyAppContact "https://docs.docker.com"
|
#define MyAppContact "https://docs.docker.com"
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#define dockerCli ".\bundle\docker\docker.exe"
|
#define dockerCli ".\bundle\docker\docker.exe"
|
||||||
#define dockerMachineCli ".\bundle\docker\docker-machine.exe"
|
#define dockerMachineCli ".\bundle\docker\docker-machine.exe"
|
||||||
|
|
||||||
#define kitematicSetup ".\bundle\kitematic\kitematic-setup.exe"
|
#define kitematic ".\bundle\kitematic"
|
||||||
|
|
||||||
#define msysGit ".\bundle\msysGit\Git.exe"
|
#define msysGit ".\bundle\msysGit\Git.exe"
|
||||||
|
|
||||||
|
|
@ -105,9 +105,11 @@ Source: ".\delete.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Dock
|
||||||
|
|
||||||
; DockerMachine
|
; DockerMachine
|
||||||
Source: "{#dockerMachineCli}"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"
|
Source: "{#dockerMachineCli}"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"
|
||||||
|
Source: ".\migrate.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"
|
||||||
|
Source: ".\migrate.bat"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"
|
||||||
|
|
||||||
; Kitematic
|
; Kitematic
|
||||||
Source: "{#kitematicSetup}"; DestDir: "{app}\installers\kitematic"; Flags: ignoreversion; AfterInstall: RunInstallKitematic(); Components: "Kitematic"
|
Source: "{#kitematic}\*"; DestDir: "{app}\kitematic"; Flags: ignoreversion recursesubdirs; Components: "Kitematic";
|
||||||
|
|
||||||
; Boot2Docker
|
; Boot2Docker
|
||||||
Source: "{#b2dIsoPath}"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"; AfterInstall: CopyBoot2DockerISO();
|
Source: "{#b2dIsoPath}"; DestDir: "{app}"; Flags: ignoreversion; Components: "DockerMachine"; AfterInstall: CopyBoot2DockerISO();
|
||||||
|
|
@ -122,12 +124,16 @@ Source: "{#virtualBoxMsi}"; DestDir: "{app}\installers\virtualbox"; DestName: "v
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
|
Name: "{userprograms}\Docker\Kitematic (Alpha)"; WorkingDir: "{app}"; Filename: "{app}\kitematic\Kitematic.exe"; Components: "Kitematic"
|
||||||
|
Name: "{commondesktop}\Kitematic (Alpha)"; WorkingDir: "{app}"; Filename: "{app}\kitematic\Kitematic.exe"; Tasks: desktopicon; Components: "Kitematic"
|
||||||
Name: "{userprograms}\Docker\Docker Quickstart Terminal"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/docker-quickstart-terminal.ico"; Components: "Docker"
|
Name: "{userprograms}\Docker\Docker Quickstart Terminal"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/docker-quickstart-terminal.ico"; Components: "Docker"
|
||||||
Name: "{commondesktop}\Docker Quickstart Terminal"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/docker-quickstart-terminal.ico"; Tasks: desktopicon; Components: "Docker"
|
Name: "{commondesktop}\Docker Quickstart Terminal"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/docker-quickstart-terminal.ico"; Tasks: desktopicon; Components: "Docker"
|
||||||
|
|
||||||
[UninstallRun]
|
[UninstallRun]
|
||||||
Filename: "{app}\delete.sh"
|
Filename: "{app}\delete.sh"
|
||||||
Filename: "{localappdata}\Kitematic\Update.exe"; Parameters: "--uninstall"; Flags: skipifdoesntexist
|
|
||||||
|
[UninstallDelete]
|
||||||
|
Type: filesandordirs; Name: "{localappdata}\..\Roaming\Kitematic"
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
var
|
var
|
||||||
|
|
@ -196,7 +202,6 @@ var
|
||||||
ResultCode: integer;
|
ResultCode: integer;
|
||||||
WinHttpReq: Variant;
|
WinHttpReq: Variant;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
|
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
|
||||||
WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventStartedData}', false);
|
WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventStartedData}', false);
|
||||||
WinHttpReq.SetRequestHeader('Content-Type', 'application/json');
|
WinHttpReq.SetRequestHeader('Content-Type', 'application/json');
|
||||||
|
|
@ -282,23 +287,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure RunInstallKitematic();
|
|
||||||
var
|
|
||||||
ResultCode: Integer;
|
|
||||||
begin
|
|
||||||
WizardForm.FilenameLabel.Caption := 'installing Kitematic'
|
|
||||||
if Exec(ExpandConstant('{app}\installers\kitematic\kitematic-setup.exe'), '--silent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
|
||||||
begin
|
|
||||||
// handle success if necessary; ResultCode contains the exit code
|
|
||||||
//MsgBox('virtualbox install OK', mbInformation, MB_OK);
|
|
||||||
end
|
|
||||||
else begin
|
|
||||||
// handle failure if necessary; ResultCode contains the error code
|
|
||||||
MsgBox('kitematic install failure', mbInformation, MB_OK);
|
|
||||||
end;
|
|
||||||
//restart := True;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure CopyBoot2DockerISO();
|
procedure CopyBoot2DockerISO();
|
||||||
var
|
var
|
||||||
ResultCode: Integer;
|
ResultCode: Integer;
|
||||||
|
|
@ -310,6 +298,34 @@ begin
|
||||||
MsgBox('File moving failed!', mbError, MB_OK);
|
MsgBox('File moving failed!', mbError, MB_OK);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure MigrateVM();
|
||||||
|
var
|
||||||
|
ResultCode: Integer;
|
||||||
|
begin
|
||||||
|
ExecAsOriginalUser('C:\Program Files\Oracle\VirtualBox\VBoxManage.exe', 'showvminfo default', '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
|
||||||
|
if ResultCode <> 1 then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
ExecAsOriginalUser('C:\Program Files\Oracle\VirtualBox\VBoxManage.exe', 'showvminfo boot2docker-vm', '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
|
||||||
|
if ResultCode = 0 then
|
||||||
|
begin
|
||||||
|
if MsgBox('Migrate your existing Boot2Docker VM to work with the Docker Toolbox? Your existing Boot2Docker VM will not be affected. This should take about a minute.', mbConfirmation, MB_YESNO) = IDYES then
|
||||||
|
begin
|
||||||
|
WizardForm.StatusLabel.Caption := 'Migrating Boot2Docker VM...'
|
||||||
|
WizardForm.FilenameLabel.Caption := 'This will take a minute...'
|
||||||
|
if ExecAsOriginalUser(ExpandConstant('{app}\migrate.bat'), ExpandConstant('> {localappdata}\Temp\toolbox-migration-logs.txt'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||||
|
begin
|
||||||
|
MsgBox('Succcessfully migrated Boot2Docker VM to a Docker Machine VM named "default"', mbInformation, MB_OK);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
MsgBox('Migration of Boot2Docker VM failed. Please file an issue with the migration logs at https://github.com/docker/machine/issues/new.', mbInformation, MB_OK);
|
||||||
|
Exec(ExpandConstant('{win}\notepad.exe'), ExpandConstant('{localappdata}\Temp\toolbox-migration-logs.txt'), '', SW_SHOW, ewNoWait, ResultCode)
|
||||||
|
end
|
||||||
|
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
ModPathName = 'modifypath';
|
ModPathName = 'modifypath';
|
||||||
ModPathType = 'user';
|
ModPathType = 'user';
|
||||||
|
|
@ -329,6 +345,8 @@ begin
|
||||||
taskname := ModPathName;
|
taskname := ModPathName;
|
||||||
if CurStep = ssPostInstall then
|
if CurStep = ssPostInstall then
|
||||||
begin
|
begin
|
||||||
|
if IsComponentSelected('DockerMachine') then
|
||||||
|
MigrateVM();
|
||||||
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
|
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
|
||||||
WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventFinishedData}', false);
|
WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventFinishedData}', false);
|
||||||
WinHttpReq.SetRequestHeader('Content-Type', 'application/json');
|
WinHttpReq.SetRequestHeader('Content-Type', 'application/json');
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,9 @@ set -e
|
||||||
# Script to grab binaries that are going to be bundled with windows installer.
|
# Script to grab binaries that are going to be bundled with windows installer.
|
||||||
# Note to maintainers: Update versions used below with newer releases
|
# Note to maintainers: Update versions used below with newer releases
|
||||||
|
|
||||||
boot2dockerIso=1.8.0-rc2
|
docker=1.8.0-rc3
|
||||||
docker=1.8.0-rc2
|
|
||||||
dockerMachine=0.4.0-rc2
|
dockerMachine=0.4.0-rc2
|
||||||
kitematic=0.8.0-rc4
|
kitematic=0.8.0-rc5
|
||||||
vbox=5.0.0
|
vbox=5.0.0
|
||||||
vboxRev=101573
|
vboxRev=101573
|
||||||
msysGit=1.9.5-preview20150319
|
msysGit=1.9.5-preview20150319
|
||||||
|
|
@ -42,16 +41,17 @@ rm finished-cert.txt
|
||||||
|
|
||||||
(
|
(
|
||||||
mkdir -p kitematic
|
mkdir -p kitematic
|
||||||
|
curl -fsSL -o kitematic.zip "https://github.com/kitematic/kitematic/releases/download/v${kitematic}/Kitematic-${kitematic}-Windows-Alpha.zip"
|
||||||
cd kitematic
|
cd kitematic
|
||||||
|
unzip ../kitematic.zip
|
||||||
curl -fsSL -o kitematic-setup.exe "https://github.com/kitematic/kitematic/releases/download/v${kitematic}/KitematicSetup-${kitematic}-Windows-Alpha.exe"
|
rm ../kitematic.zip
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
mkdir -p Boot2Docker
|
mkdir -p Boot2Docker
|
||||||
cd Boot2Docker
|
cd Boot2Docker
|
||||||
|
|
||||||
curl -fsSL -o boot2docker.iso "https://github.com/${boot2dockerIsoSrc}/boot2docker/releases/download/v${boot2dockerIso}/boot2docker.iso"
|
curl -fsSL -o boot2docker.iso "https://github.com/${boot2dockerIsoSrc}/boot2docker/releases/download/v${docker}/boot2docker.iso"
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ clear
|
||||||
|
|
||||||
cd "$(dirname "$BASH_SOURCE")"
|
cd "$(dirname "$BASH_SOURCE")"
|
||||||
|
|
||||||
( set -x; ./docker-machine rm -f docker-vm ) || true
|
( set -x; ./docker-machine rm -f default ) || true
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo '[Press any key to exit]'
|
echo '[Press any key to exit]'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
:: Batch file that installer can run. Simply runs bash script with the same name
|
||||||
|
|
||||||
|
cd %~dp0
|
||||||
|
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i migrate.sh
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
./docker-machine -D create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm default | sed -e '/BEGIN/,/END/d'
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VM=docker-vm
|
VM=default
|
||||||
DOCKER_MACHINE=./docker-machine.exe
|
DOCKER_MACHINE=./docker-machine.exe
|
||||||
|
|
||||||
BLUE='\033[1;34m'
|
BLUE='\033[1;34m'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue