Tweaking for Hugo Updating the Dockerfile with new sed; fix broken link on Kitematic Fixing image pull for Dockerfile Removing docs targets Signed-off-by: Mary Anthony <mary@docker.com>
7.2 KiB
Get the required software for Windows
This page explains how to get the software you need to use a a Windows Server 2012 or Windows 8 machine for Docker development. Before you begin contributing you must have:
- a GitHub account
- Git for Windows (msysGit)
- TDM-GCC, a compiler suite for Windows
- MinGW (tar and xz)
- Go language
Note
: This installation procedure refers to the
C:\
drive. If you system's main drive isD:\
you'll need to substitute that in where appropriate in these instructions.
Get a GitHub account
To contribute to the Docker project, you will need a GitHub account. A free account is fine. All the Docker project repositories are public and visible to everyone.
You should also have some experience using both the GitHub application and git
on the command line.
Install Git for Windows
Git for Windows includes several tools including msysGit, which is a build environment. The environment contains the tools you need for development such as Git and a Git Bash shell.
-
Browse to the Git for Windows download page.
-
Click Download.
Windows prompts you to save the file to your machine.
-
Run the saved file.
The system displays the Git Setup wizard.
-
Click the Next button to move through the wizard and accept all the defaults.
-
Click Finish when you are done.
Installing TDM-GCC
TDM-GCC is a compiler suite for Windows. You'll use this suite to compile the Docker Go code as you develop.
-
Browse to tdm-gcc download page.
-
Click on the latest 64-bit version of the package.
Windows prompts you to save the file to your machine
-
Set up the suite by running the downloaded file.
The system opens the TDM-GCC Setup wizard.
-
Click Create.
-
Click the Next button to move through the wizard and accept all the defaults.
-
Click Finish when you are done.
Installing MinGW (tar and xz)
MinGW is a minimalist port of the GNU Compiler Collection (GCC). In this
procedure, you first download and install the MinGW installation manager. Then,
you use the manager to install the tar
and xz
tools from the collection.
-
Browse to MinGW SourceForge.
-
Click Download.
Windows prompts you to save the file to your machine
-
Run the downloaded file.
The system opens the MinGW Installation Manager Setup Tool
-
Choose Install install the MinGW Installation Manager.
-
Press Continue.
The system installs and then opens the MinGW Installation Manager.
-
Press Continue after the install completes to open the manager.
-
Select All Packages > MSYS Base System from the left hand menu.
The system displays the available packages.
-
Click on the the msys-tar bin package and choose Mark for Installation.
-
Click on the msys-xz bin package and choose Mark for Installation.
-
Select Installation > Apply Changes, to install the selected packages.
The system displays the Schedule of Pending Actions Dialog.
-
Press Apply
MingGW installs the packages for you.
-
Close the dialog and the MinGW Installation Manager.
Set up your environment variables
You'll need to add the compiler to your Path
environment variable.
-
Open the Control Panel.
-
Choose System and Security > System.
-
Click the Advanced system settings link in the sidebar.
The system opens the System Properties dialog.
-
Select the Advanced tab.
-
Click Environment Variables.
The system opens the Environment Variables dialog dialog.
-
Locate the System variables area and scroll to the Path variable.
-
Click Edit to edit the variable (you can also double-click it).
The system opens the Edit System Variable dialog.
-
Make sure the
Path
includesC:\TDM-GCC64\bin
If you don't see
C:\TDM-GCC64\bin
, add it. -
Press OK to close this dialog.
-
Press OK twice to close out of the remaining dialogs.
Install Go and cross-compile it
In this section, you install the Go language. Then, you build the source so that it can cross-compile for linux/amd64
architectures.
-
Open Go Language download page in your browser.
-
Locate and click the latest
.msi
installer.The system prompts you to save the file.
-
Run the installer.
The system opens the Go Programming Language Setup dialog.
-
Select all the defaults to install.
-
Press Finish to close the installation dialog.
-
Start a command prompt.
-
Change to the Go
src
directory.cd c:\Go\src
-
Set the following Go variables
c:\Go\src> set GOOS=linux c:\Go\src> set GOARCH=amd64
-
Compile the source.
c:\Go\src> make.bat
Compiling the source also adds a number of variables to your Windows environment.
Get the Docker repository
In this step, you start a Git bash
terminal and get the Docker source code
from GitHub.
-
Locate the Git Bash program and start it.
Recall that Git Bash came with the Git for Windows installation. Git Bash just as it sounds allows you to run a Bash terminal on Windows.
-
Change to the root directory.
$ cd /c/
-
Make a
gopath
directory.$ mkdir gopath
-
Go get the
docker/docker
repository.$ go.exe get github.com/docker/docker package github.com/docker/docker imports github.com/docker/docker imports github.com/docker/docker: no buildable Go source files in C:\gopath\src\github.com\docker\docker
In the next steps, you create environment variables for you Go paths.
-
Open the Control Panel on your system.
-
Choose System and Security > System.
-
Click the Advanced system settings link in the sidebar.
The system opens the System Properties dialog.
-
Select the Advanced tab.
-
Click Environment Variables.
The system opens the Environment Variables dialog dialog.
-
Locate the System variables area and scroll to the Path variable.
-
Click New.
Now you are going to create some new variables. These paths you'll create in the next procedure; but you can set them now.
-
Enter
GOPATH
for the Variable Name. -
For the Variable Value enter the following:
C:\gopath;C:\gopath\src\github.com\docker\docker\vendor
-
Press OK to close this dialog.
The system adds
GOPATH
to the list of System Variables. -
Press OK twice to close out of the remaining dialogs.
Where to go next
In the next section, you'll learn how to set up and configure Git for contributing to Docker.