4545#
4646# 1. Clone the sources from github.com:
4747#
48- # >> git clone https://github.com/docker/docker.git C:\go \src\github.com\docker\docker
49- # >> Cloning into 'C:\go \src\github.com\docker\docker'...
48+ # >> git clone https://github.com/docker/docker.git C:\gopath \src\github.com\docker\docker
49+ # >> Cloning into 'C:\gopath \src\github.com\docker\docker'...
5050# >> remote: Counting objects: 186216, done.
5151# >> remote: Compressing objects: 100% (21/21), done.
5252# >> remote: Total 186216 (delta 5), reused 0 (delta 0), pack-reused 186195
5959#
6060# 2. Change directory to the cloned docker sources:
6161#
62- # >> cd C:\go \src\github.com\docker\docker
62+ # >> cd C:\gopath \src\github.com\docker\docker
6363#
6464#
6565# 3. Build a docker image with the components required to build the docker binaries from source
7979# 5. Copy the binaries out of the container, replacing HostPath with an appropriate destination
8080# folder on the host system where you want the binaries to be located.
8181#
82- # >> docker cp binaries:C:\go \src\github.com\docker\docker\bundles\docker.exe C:\HostPath\docker.exe
83- # >> docker cp binaries:C:\go \src\github.com\docker\docker\bundles\dockerd.exe C:\HostPath\dockerd.exe
82+ # >> docker cp binaries:C:\gopath \src\github.com\docker\docker\bundles\docker.exe C:\HostPath\docker.exe
83+ # >> docker cp binaries:C:\gopath \src\github.com\docker\docker\bundles\dockerd.exe C:\HostPath\dockerd.exe
8484#
8585#
8686# 6. (Optional) Remove the interim container holding the built executable binaries:
@@ -172,7 +172,7 @@ ARG GO_VERSION=1.12.15
172172# - FROM_DOCKERFILE is used for detection of building within a container.
173173ENV GO_VERSION=${GO_VERSION} `
174174 GIT_VERSION=2.11.1 `
175- GOPATH=C:\go `
175+ GOPATH=C:\gopath `
176176 FROM_DOCKERFILE=1
177177
178178RUN `
@@ -249,7 +249,7 @@ RUN `
249249 Remove-Item C:\gitsetup.zip; `
250250 `
251251 Write-Host INFO: Creating source directory...; `
252- New-Item -ItemType Directory -Path C:\go \src\github.com\docker\docker | Out-Null; `
252+ New-Item -ItemType Directory -Path ${GOPATH} \src\github.com\docker\docker | Out-Null; `
253253 `
254254 Write-Host INFO: Configuring git core.autocrlf...; `
255255 C:\git\cmd\git config --global core.autocrlf true; `
@@ -260,7 +260,7 @@ RUN `
260260ENTRYPOINT ["powershell.exe"]
261261
262262# Set the working directory to the location of the sources
263- WORKDIR C:\go \src\github.com\docker\docker
263+ WORKDIR ${GOPATH} \src\github.com\docker\docker
264264
265265# Copy the sources into the container
266266COPY . .
0 commit comments