├── .gitignore
├── 256-logo.xcf
├── Boot2Docker.iss
├── LICENSE
├── MAINTENANCE.md
├── README.md
├── Windows-demo.gif
├── boot2docker.ico
├── bundle.sh
├── delete.sh
├── logo-docker-side.bmp
├── logo-docker-side.xcf
├── logo-docker-small.bmp
├── logo-docker-small.xcf
├── modpath.iss
└── start.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | Output/**
2 | bundle/**
3 |
--------------------------------------------------------------------------------
/256-logo.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/256-logo.xcf
--------------------------------------------------------------------------------
/Boot2Docker.iss:
--------------------------------------------------------------------------------
1 | ; Script generated by the Inno Setup Script Wizard.
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3 |
4 | #define MyAppName "Boot2Docker for Windows"
5 | #define MyAppVersion "1.8.0"
6 | #define MyAppPublisher "Docker Inc"
7 | #define MyAppURL "https://docker.com"
8 | #define MyAppContact "https://docs.docker.com"
9 |
10 | #define b2dIso ".\bundle\Boot2Docker\boot2docker.iso"
11 | #define b2dCli ".\bundle\Boot2Docker\boot2docker.exe"
12 |
13 | #define dockerCli ".\bundle\docker\docker.exe"
14 |
15 | #define msysGit ".\bundle\msysGit\Git.exe"
16 |
17 | #define virtualBoxCommon ".\bundle\VirtualBox\common.cab"
18 | #define virtualBoxMsi ".\bundle\VirtualBox\VirtualBox_amd64.msi"
19 |
20 | [Setup]
21 | ; NOTE: The value of AppId uniquely identifies this application.
22 | ; Do not use the same AppId value in installers for other applications.
23 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
24 | AppId={{05BD04E9-4AB5-46AC-891E-60EA8FD57D56}
25 | AppCopyright={#MyAppPublisher}
26 | AppContact={#MyAppContact}
27 | AppComments={#MyAppURL}
28 | AppName={#MyAppName}
29 | AppVersion={#MyAppVersion}
30 | ;AppVerName={#MyAppName} {#MyAppVersion}
31 | AppPublisher={#MyAppPublisher}
32 | AppPublisherURL={#MyAppURL}
33 | AppSupportURL={#MyAppURL}
34 | AppUpdatesURL={#MyAppURL}
35 | ArchitecturesAllowed=x64
36 | ArchitecturesInstallIn64BitMode=x64
37 | DefaultDirName={pf}\{#MyAppName}
38 | DefaultGroupName=Docker
39 | ; lets not be annoying
40 | ;InfoBeforeFile=.\LICENSE
41 | ;DisableFinishedPage
42 | ;InfoAfterFile=
43 | OutputBaseFilename=docker-install
44 | Compression=lzma
45 | SolidCompression=yes
46 | WizardImageFile=logo-docker-side.bmp
47 | WizardSmallImageFile=logo-docker-small.bmp
48 | WizardImageStretch=no
49 | WizardImageBackColor=$325461
50 |
51 | ; in the installer itself:
52 | SetupIconFile=boot2docker.ico
53 | ; in the "Add/Remove" list:
54 | UninstallDisplayIcon={app}\boot2docker.ico
55 |
56 | SignTool=ksign /d $q{#MyAppName}$q /du $q{#MyAppURL}$q $f
57 |
58 | ; for modpath.iss
59 | ChangesEnvironment=true
60 |
61 | [Languages]
62 | Name: "english"; MessagesFile: "compiler:Default.isl"
63 |
64 | [Types]
65 | Name: "full"; Description: "Full installation"
66 | Name: "upgrade"; Description: "Upgrade Boot2Docker only"
67 | Name: "custom"; Description: "Custom installation"; Flags: iscustom
68 |
69 | [Tasks]
70 | Name: desktopicon; Description: "{cm:CreateDesktopIcon}"
71 | Name: modifypath; Description: "Add docker.exe/boot2docker.exe to &PATH"
72 | Name: rebootwindows; Description: "&Reboot Windows at the end of installation"; Flags: restart unchecked
73 |
74 | [Components]
75 | Name: "Docker"; Description: "Docker Client for Windows" ; Types: full upgrade
76 | Name: "Boot2Docker"; Description: "Boot2Docker management tool and ISO" ; Types: full upgrade
77 | Name: "VirtualBox"; Description: "VirtualBox"; Types: full
78 | Name: "MSYS"; Description: "MSYS-git UNIX tools"; Types: full
79 |
80 | [Files]
81 | Source: ".\boot2docker.ico"; DestDir: "{app}"; Flags: ignoreversion
82 |
83 | ; Docker
84 | Source: "{#dockerCli}"; DestDir: "{app}"; Flags: ignoreversion; Components: "Docker"
85 |
86 | ; Boot2Docker
87 | Source: "{#b2dIso}"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
88 | Source: "{#b2dCli}"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
89 | Source: ".\start.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
90 | Source: ".\delete.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
91 |
92 | ; msys-Git
93 | Source: "{#msysGit}"; DestDir: "{app}\installers\msys-git"; DestName: "msys-git.exe"; AfterInstall: RunInstallMSYS(); Components: "MSYS"
94 |
95 | ; VirtualBox
96 | Source: "{#virtualBoxCommon}"; DestDir: "{app}\installers\virtualbox"; Components: "VirtualBox"
97 | Source: "{#virtualBoxMsi}"; DestDir: "{app}\installers\virtualbox"; DestName: "virtualbox.msi"; AfterInstall: RunInstallVirtualBox(); Components: "VirtualBox"
98 |
99 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
100 |
101 | [Icons]
102 | Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
103 | Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
104 | Name: "{group}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
105 | Name: "{commondesktop}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"; Tasks: desktopicon
106 | Name: "{commonprograms}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
107 | Name: "{group}\Delete Boot2Docker VM"; WorkingDir: "{app}"; Filename: "{app}\delete.sh"
108 |
109 | [UninstallRun]
110 | Filename: "{app}\delete.sh"
111 |
112 | [Code]
113 | var
114 | restart: boolean;
115 | // http://stackoverflow.com/questions/9238698/show-licenseagreement-link-in-innosetup-while-installation
116 | DockerInstallDocs: TLabel;
117 |
118 | const
119 | UninstallKey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppId")}_is1';
120 | // 32 bit on 64 HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
121 |
122 |
123 | function IsUpgrade: Boolean;
124 | var
125 | Value: string;
126 | begin
127 | Result := (
128 | RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Value)
129 | or
130 | RegQueryStringValue(HKCU, UninstallKey, 'UninstallString', Value)
131 | ) and (Value <> '');
132 | end;
133 |
134 |
135 | function NeedRestart(): Boolean;
136 | begin
137 | Result := restart;
138 | end;
139 |
140 | function NeedToInstallVirtualBox(): Boolean;
141 | begin
142 | Result := (
143 | (GetEnv('VBOX_INSTALL_PATH') = '')
144 | and
145 | (GetEnv('VBOX_MSI_INSTALL_PATH') = '')
146 | );
147 | end;
148 |
149 | function NeedToInstallMSYS(): Boolean;
150 | begin
151 | Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1');
152 | end;
153 |
154 | procedure DocLinkClick(Sender: TObject);
155 | var
156 | ErrorCode: Integer;
157 | begin
158 | ShellExec('', 'https://docs.docker.com/installation/windows/', '', '', SW_SHOW, ewNoWait, ErrorCode);
159 | end;
160 |
161 | procedure InitializeWizard;
162 | begin
163 | DockerInstallDocs := TLabel.Create(WizardForm);
164 | DockerInstallDocs.Parent := WizardForm;
165 | DockerInstallDocs.Left := 8;
166 | DockerInstallDocs.Top := WizardForm.ClientHeight - DockerInstallDocs.ClientHeight - 8;
167 | DockerInstallDocs.Cursor := crHand;
168 | DockerInstallDocs.Font.Color := clBlue;
169 | DockerInstallDocs.Font.Style := [fsUnderline];
170 | DockerInstallDocs.Caption := '{#MyAppName} installation documentation';
171 | DockerInstallDocs.OnClick := @DocLinkClick;
172 | end;
173 |
174 | procedure CurPageChanged(CurPageID: Integer);
175 | begin
176 | DockerInstallDocs.Visible := True;
177 |
178 | WizardForm.FinishedLabel.AutoSize := True;
179 | WizardForm.FinishedLabel.Caption :=
180 | '{#MyAppName} installation completed.' + \
181 | #13#10 + \
182 | #13#10 + \
183 | 'Run using the `Boot2Docker Start` icon on your desktop or in [Program Files] - then start a test container with:' + \
184 | #13#10 + \
185 | ' `docker run hello-world`' + \
186 | #13#10 + \
187 | #13#10 + \
188 | // TODO: it seems making hyperlinks is hard :/
189 | //'To save and share container images, automate workflows, and more sign-up for a free Docker Hub account.' + \
190 | #13#10 + \
191 | #13#10 +
192 | 'You can upgrade your existing Boot2Docker VM without data loss by running:' + \
193 | #13#10 + \
194 | ' `boot2docker upgrade`' + \
195 | #13#10 + \
196 | #13#10 + \
197 | 'For further information, please see the {#MyAppName} installation documentation link.'
198 | ;
199 | //if CurPageID = wpSelectDir then
200 | // to go with DisableReadyPage=yes and DisableProgramGroupPage=yes
201 | //WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall)
202 | //else
203 | //WizardForm.NextButton.Caption := SetupMessage(msgButtonNext);
204 | //if CurPageID = wpFinished then
205 | //WizardForm.NextButton.Caption := SetupMessage(msgButtonFinish)
206 | if CurPageID = wpSelectComponents then
207 | begin
208 | if IsUpgrade() then
209 | begin
210 | Wizardform.TypesCombo.ItemIndex := 2
211 | end;
212 | Wizardform.ComponentsList.Checked[2] := NeedToInstallVirtualBox();
213 | Wizardform.ComponentsList.Checked[3] := NeedToInstallMSYS();
214 | end;
215 | end;
216 |
217 | procedure RunInstallVirtualBox();
218 | var
219 | ResultCode: Integer;
220 | begin
221 | WizardForm.FilenameLabel.Caption := 'installing VirtualBox'
222 | if Exec(ExpandConstant('msiexec'), ExpandConstant('/qn /i "{app}\installers\virtualbox\virtualbox.msi" /norestart'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
223 | begin
224 | // handle success if necessary; ResultCode contains the exit code
225 | //MsgBox('virtualbox install OK', mbInformation, MB_OK);
226 | end
227 | else begin
228 | // handle failure if necessary; ResultCode contains the error code
229 | MsgBox('virtualbox install failure', mbInformation, MB_OK);
230 | end;
231 | //restart := True;
232 | end;
233 |
234 | procedure RunInstallMSYS();
235 | var
236 | ResultCode: Integer;
237 | begin
238 | WizardForm.FilenameLabel.Caption := 'installing MSYS Git'
239 | if Exec(ExpandConstant('{app}\installers\msys-git\msys-git.exe'), '/sp- /verysilent /norestart', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
240 | begin
241 | // handle success if necessary; ResultCode contains the exit code
242 | //MsgBox('msys installed OK', mbInformation, MB_OK);
243 | end
244 | else begin
245 | // handle failure if necessary; ResultCode contains the error code
246 | MsgBox('msys install failure', mbInformation, MB_OK);
247 | end;
248 | end;
249 |
250 | const
251 | ModPathName = 'modifypath';
252 | ModPathType = 'user';
253 |
254 | function ModPathDir(): TArrayOfString;
255 | begin
256 | setArrayLength(Result, 1);
257 | Result[0] := ExpandConstant('{app}');
258 | end;
259 | #include "modpath.iss"
260 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | Copyright 2014 Docker, Inc.
180 |
181 | Licensed under the Apache License, Version 2.0 (the "License");
182 | you may not use this file except in compliance with the License.
183 | You may obtain a copy of the License at
184 |
185 | http://www.apache.org/licenses/LICENSE-2.0
186 |
187 | Unless required by applicable law or agreed to in writing, software
188 | distributed under the License is distributed on an "AS IS" BASIS,
189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190 | See the License for the specific language governing permissions and
191 | limitations under the License.
192 |
--------------------------------------------------------------------------------
/MAINTENANCE.md:
--------------------------------------------------------------------------------
1 | # Preparing development environment (for maintainers)
2 |
3 | Install Inno Setup 5 non-unicode: http://www.jrsoftware.org/isdl.php (`isetup-5.x.x-unicode.exe`).
4 |
5 | Install `kSignCMD`: http://codesigning.ksoftware.net/ (click "Download kSign"
6 | and then "FREE DOWNLOAD" or "Click Here to Download kSign", which will likely be
7 | a link to http://cdn1.ksoftware.net/ksign_installer.exe)
8 |
9 | Install the `docker-code-signing.pfx` certificate somewhere (the instructions
10 | below assume `Z:\sven\src\docker\windows-installer\docker-code-signing.pfx`);
11 | you will need the password (`d_get_from_core` below).
12 |
13 | Open `Boot2Docker.iss` in the Inno Setup Compiler. It has a few constants at
14 | the top that are important to make note of (especially `MyAppVersion` and the
15 | path variables `b2dISO`, `b2dCLI`, `msysGit`, `virtualBoxMsi`, and `virtualBoxCommon`).
16 |
17 | Launch **Inno Setup Compiler** by opening `boot2docker.iss` and add code signing
18 | by applying the following steps:
19 |
20 | - Click "Tools" --> "Configure Sign Tools" > "Add"
21 | - "Name of the Sign Tool:" `ksign`
22 | - "Command of the Sign Tool:" `"C:\Program Files (x86)\kSign\kSignCMD.exe" /f Z:\sven\src\docker\windows-installer\docker-code-signing.pfx /p d_get_from_core $p`
23 |
24 | # Releasing a new version
25 |
26 | Update the versions of the dependencies as well as Boot2Docker in `bundle.sh`.
27 |
28 | Update `#define MyAppVersion` line in `Boot2Docker.iss`.
29 |
30 | # Downloading bundle dependencies
31 |
32 | Open a git bash window in this directory and run script:
33 |
34 | ./bundle.sh
35 |
36 | This should be downloading dependencies with their correct versions to `bundle\`
37 | folder where the Inno Setup Compiler can pick up from.
38 |
39 | # Compiling the installer
40 |
41 | After configuring, open `boot2docker.iss` with Inno Setup Compiler and hit
42 | **'Build'**. The results will be in the `Output` folder.
43 |
44 | This can be done through commandline as welll. Launch a cmd.exe shell from this
45 | directory and run:
46 |
47 | "c:\Program Files (x86)\Inno Setup 5\ISCC.exe" Boot2Docker.iss
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Deprecated
2 |
3 | This project (the boot2docker Windows Installer) is officially deprecated in favor of the new [Docker Toolbox](https://www.docker.com/toolbox).
4 |
5 | # windows-installer
6 |
7 | Installation [instructions](https://docs.docker.com/installation/windows/) available on the Docker documentation site.
8 |
9 | ## What is included:
10 |
11 | - [msys-git](http://msysgit.github.io/) for tools like `OpenSSH` and `BASH`
12 | - [VirtualBox](https://www.virtualbox.org)
13 | - [Boot2Docker-cli management tool](https://github.com/boot2docker/boot2docker-cli)
14 | - [Boot2Docker ISO](https://github.com/boot2docker/boot2docker)
15 | - [Docker Client for Windows](https://github.com/docker/docker)
16 |
17 | ## Why Inno Setup?
18 |
19 | I've chosen to make a simple installer using [Inno Setup](http://www.jrsoftware.org/)
20 | because that is what the [msysGit](http://git-scm.com/) installer is built with.
21 |
22 | (It also happens that I've used Inno Setup before, so I can make something faster.)
23 |
24 | Making a simple Wix for the Boot2Docker-cli should be simple, and this can then be
25 | used in this all-in-one installer too.
26 |
27 | ## Maintenance
28 |
29 | See `MAINTENANCE.md` for instructions on how to update, bundle and compile the
30 | Boot2Docker Windows Installer.
--------------------------------------------------------------------------------
/Windows-demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/Windows-demo.gif
--------------------------------------------------------------------------------
/boot2docker.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/boot2docker.ico
--------------------------------------------------------------------------------
/bundle.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | # Script to grab binaries that are going to be bundled with windows installer.
5 | # Note to maintainers: Update versions used below with newer releases
6 |
7 | boot2dockerIso=1.8.0
8 | boot2dockerCli=1.8.0
9 | docker=1.8.0
10 | vbox=5.0.0
11 | vboxRev=101573
12 | msysGit=1.9.5-preview20150319
13 |
14 | boot2dockerIsoSrc=boot2docker
15 | boot2dockerCliSrc=boot2docker
16 | dockerBucket=get.docker.com
17 |
18 | set -x
19 | rm -r bundle
20 | mkdir bundle
21 | cd bundle
22 |
23 | (
24 | mkdir -p docker
25 | cd docker
26 |
27 | curl -fsSL -o docker.exe "https://${dockerBucket}/builds/Windows/x86_64/docker-${docker}.exe"
28 | )
29 |
30 | (
31 | mkdir -p Boot2Docker
32 | cd Boot2Docker
33 |
34 | curl -fsSL -o boot2docker.iso "https://github.com/${boot2dockerIsoSrc}/boot2docker/releases/download/v${boot2dockerIso}/boot2docker.iso"
35 | curl -fsSL -o boot2docker.exe "https://github.com/${boot2dockerCliSrc}/boot2docker-cli/releases/download/v${boot2dockerCli}/boot2docker-v${boot2dockerCli}-windows-amd64.exe"
36 | )
37 |
38 | (
39 | mkdir -p msysGit
40 | cd msysGit
41 |
42 | curl -fsSL -o Git.exe "https://github.com/msysgit/msysgit/releases/download/Git-${msysGit}/Git-${msysGit}.exe"
43 | )
44 |
45 | (
46 | mkdir -p VirtualBox
47 | cd VirtualBox
48 |
49 | # http://www.virtualbox.org/manual/ch02.html
50 | curl -fsSL -o virtualbox.exe "http://download.virtualbox.org/virtualbox/${vbox}/VirtualBox-${vbox}-${vboxRev}-Win.exe"
51 |
52 | virtualbox.exe -extract -silent -path .
53 | rm virtualbox.exe # not neeeded after extraction
54 |
55 | rm *x86.msi # not needed as we only install 64-bit
56 | mv *_amd64.msi VirtualBox_amd64.msi # remove version number
57 | )
58 |
--------------------------------------------------------------------------------
/delete.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | # clear the MSYS MOTD
5 | clear
6 |
7 | cd "$(dirname "$BASH_SOURCE")"
8 |
9 | ( set -x; ./boot2docker.exe stop ) || true
10 |
11 | ( set -x; ./boot2docker.exe delete; rm -rf "$HOME/.boot2docker" ) || true
12 |
13 | echo
14 | echo '[Press any key to exit]'
15 | read
16 |
--------------------------------------------------------------------------------
/logo-docker-side.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/logo-docker-side.bmp
--------------------------------------------------------------------------------
/logo-docker-side.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/logo-docker-side.xcf
--------------------------------------------------------------------------------
/logo-docker-small.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/logo-docker-small.bmp
--------------------------------------------------------------------------------
/logo-docker-small.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/boot2docker/windows-installer/6ad529e1b7835607b8a0ca8eb900a295f71b5b98/logo-docker-small.xcf
--------------------------------------------------------------------------------
/modpath.iss:
--------------------------------------------------------------------------------
1 | // ----------------------------------------------------------------------------
2 | //
3 | // Inno Setup Ver: 5.4.2
4 | // Script Version: 1.4.2
5 | // Author: Jared Breland
6 | // Homepage: http://www.legroom.net/software
7 | // License: GNU Lesser General Public License (LGPL), version 3
8 | // http://www.gnu.org/licenses/lgpl.html
9 | //
10 | // Script Function:
11 | // Allow modification of environmental path directly from Inno Setup installers
12 | //
13 | // Instructions:
14 | // Copy modpath.iss to the same directory as your setup script
15 | //
16 | // Add this statement to your [Setup] section
17 | // ChangesEnvironment=true
18 | //
19 | // Add this statement to your [Tasks] section
20 | // You can change the Description or Flags
21 | // You can change the Name, but it must match the ModPathName setting below
22 | // Name: modifypath; Description: &Add application directory to your environmental path; Flags: unchecked
23 | //
24 | // Add the following to the end of your [Code] section
25 | // ModPathName defines the name of the task defined above
26 | // ModPathType defines whether the 'user' or 'system' path will be modified;
27 | // this will default to user if anything other than system is set
28 | // setArrayLength must specify the total number of dirs to be added
29 | // Result[0] contains first directory, Result[1] contains second, etc.
30 | // const
31 | // ModPathName = 'modifypath';
32 | // ModPathType = 'user';
33 | //
34 | // function ModPathDir(): TArrayOfString;
35 | // begin
36 | // setArrayLength(Result, 1);
37 | // Result[0] := ExpandConstant('{app}');
38 | // end;
39 | // #include "modpath.iss"
40 | // ----------------------------------------------------------------------------
41 |
42 | procedure ModPath();
43 | var
44 | oldpath: String;
45 | newpath: String;
46 | updatepath: Boolean;
47 | pathArr: TArrayOfString;
48 | aExecFile: String;
49 | aExecArr: TArrayOfString;
50 | i, d: Integer;
51 | pathdir: TArrayOfString;
52 | regroot: Integer;
53 | regpath: String;
54 |
55 | begin
56 | // Get constants from main script and adjust behavior accordingly
57 | // ModPathType MUST be 'system' or 'user'; force 'user' if invalid
58 | if ModPathType = 'system' then begin
59 | regroot := HKEY_LOCAL_MACHINE;
60 | regpath := 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
61 | end else begin
62 | regroot := HKEY_CURRENT_USER;
63 | regpath := 'Environment';
64 | end;
65 |
66 | // Get array of new directories and act on each individually
67 | pathdir := ModPathDir();
68 | for d := 0 to GetArrayLength(pathdir)-1 do begin
69 | updatepath := true;
70 |
71 | // Modify WinNT path
72 | if UsingWinNT() = true then begin
73 |
74 | // Get current path, split into an array
75 | RegQueryStringValue(regroot, regpath, 'Path', oldpath);
76 | oldpath := oldpath + ';';
77 | i := 0;
78 |
79 | while (Pos(';', oldpath) > 0) do begin
80 | SetArrayLength(pathArr, i+1);
81 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1);
82 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath));
83 | i := i + 1;
84 |
85 | // Check if current directory matches app dir
86 | if pathdir[d] = pathArr[i-1] then begin
87 | // if uninstalling, remove dir from path
88 | if IsUninstaller() = true then begin
89 | continue;
90 | // if installing, flag that dir already exists in path
91 | end else begin
92 | updatepath := false;
93 | end;
94 | end;
95 |
96 | // Add current directory to new path
97 | if i = 1 then begin
98 | newpath := pathArr[i-1];
99 | end else begin
100 | newpath := newpath + ';' + pathArr[i-1];
101 | end;
102 | end;
103 |
104 | // Append app dir to path if not already included
105 | if (IsUninstaller() = false) AND (updatepath = true) then
106 | newpath := newpath + ';' + pathdir[d];
107 |
108 | // Write new path
109 | RegWriteStringValue(regroot, regpath, 'Path', newpath);
110 |
111 | // Modify Win9x path
112 | end else begin
113 |
114 | // Convert to shortened dirname
115 | pathdir[d] := GetShortName(pathdir[d]);
116 |
117 | // If autoexec.bat exists, check if app dir already exists in path
118 | aExecFile := 'C:\AUTOEXEC.BAT';
119 | if FileExists(aExecFile) then begin
120 | LoadStringsFromFile(aExecFile, aExecArr);
121 | for i := 0 to GetArrayLength(aExecArr)-1 do begin
122 | if IsUninstaller() = false then begin
123 | // If app dir already exists while installing, skip add
124 | if (Pos(pathdir[d], aExecArr[i]) > 0) then
125 | updatepath := false;
126 | break;
127 | end else begin
128 | // If app dir exists and = what we originally set, then delete at uninstall
129 | if aExecArr[i] = 'SET PATH=%PATH%;' + pathdir[d] then
130 | aExecArr[i] := '';
131 | end;
132 | end;
133 | end;
134 |
135 | // If app dir not found, or autoexec.bat didn't exist, then (create and) append to current path
136 | if (IsUninstaller() = false) AND (updatepath = true) then begin
137 | SaveStringToFile(aExecFile, #13#10 + 'SET PATH=%PATH%;' + pathdir[d], True);
138 |
139 | // If uninstalling, write the full autoexec out
140 | end else begin
141 | SaveStringsToFile(aExecFile, aExecArr, False);
142 | end;
143 | end;
144 | end;
145 | end;
146 |
147 | // Split a string into an array using passed delimeter
148 | procedure MPExplode(var Dest: TArrayOfString; Text: String; Separator: String);
149 | var
150 | i: Integer;
151 | begin
152 | i := 0;
153 | repeat
154 | SetArrayLength(Dest, i+1);
155 | if Pos(Separator,Text) > 0 then begin
156 | Dest[i] := Copy(Text, 1, Pos(Separator, Text)-1);
157 | Text := Copy(Text, Pos(Separator,Text) + Length(Separator), Length(Text));
158 | i := i + 1;
159 | end else begin
160 | Dest[i] := Text;
161 | Text := '';
162 | end;
163 | until Length(Text)=0;
164 | end;
165 |
166 |
167 | procedure CurStepChanged(CurStep: TSetupStep);
168 | var
169 | taskname: String;
170 | begin
171 | taskname := ModPathName;
172 | if CurStep = ssPostInstall then
173 | if IsTaskSelected(taskname) then
174 | ModPath();
175 | end;
176 |
177 | procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
178 | var
179 | aSelectedTasks: TArrayOfString;
180 | i: Integer;
181 | taskname: String;
182 | regpath: String;
183 | regstring: String;
184 | appid: String;
185 | begin
186 | // only run during actual uninstall
187 | if CurUninstallStep = usUninstall then begin
188 | // get list of selected tasks saved in registry at install time
189 | appid := '{#emit SetupSetting("AppId")}';
190 | if appid = '' then appid := '{#emit SetupSetting("AppName")}';
191 | regpath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\'+appid+'_is1');
192 | RegQueryStringValue(HKLM, regpath, 'Inno Setup: Selected Tasks', regstring);
193 | if regstring = '' then RegQueryStringValue(HKCU, regpath, 'Inno Setup: Selected Tasks', regstring);
194 |
195 | // check each task; if matches modpath taskname, trigger patch removal
196 | if regstring <> '' then begin
197 | taskname := ModPathName;
198 | MPExplode(aSelectedTasks, regstring, ',');
199 | if GetArrayLength(aSelectedTasks) > 0 then begin
200 | for i := 0 to GetArrayLength(aSelectedTasks)-1 do begin
201 | if comparetext(aSelectedTasks[i], taskname) = 0 then
202 | ModPath();
203 | end;
204 | end;
205 | end;
206 | end;
207 | end;
208 |
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | # clear the MSYS MOTD
5 | clear
6 |
7 | cd "$(dirname "$BASH_SOURCE")"
8 |
9 | ISO="$HOME/.boot2docker/boot2docker.iso"
10 |
11 | if [ ! -e "$ISO" ]; then
12 | echo 'copying initial boot2docker.iso (run "boot2docker.exe download" to update)'
13 | mkdir -p "$(dirname "$ISO")"
14 | cp ./boot2docker.iso "$ISO"
15 | fi
16 |
17 | echo 'initializing...'
18 | ./boot2docker.exe init
19 | echo
20 |
21 | echo 'starting...'
22 | ./boot2docker.exe start
23 | echo
24 |
25 | echo 'IP address of docker VM:'
26 | ./boot2docker.exe ip
27 | echo
28 |
29 | echo 'setting environment variables ...'
30 | ./boot2docker.exe shellinit | sed 's,\\,\\\\,g' # eval swallows single backslashes in windows style path
31 | eval "$(./boot2docker.exe shellinit 2>/dev/null | sed 's,\\,\\\\,g')"
32 | echo
33 |
34 | echo 'You can now use `docker` directly, or `boot2docker ssh` to log into the VM.'
35 |
36 | cd
37 | exec "$BASH" --login -i
38 |
--------------------------------------------------------------------------------