Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
| 1 | 1 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,57 @@ |
| 0 |
+# This file describes the standard way to build Docker, using docker on TP4 |
|
| 1 |
+# |
|
| 2 |
+# Usage: |
|
| 3 |
+# |
|
| 4 |
+# # Assemble the full dev environment. This is slow the first time. |
|
| 5 |
+# docker build -t docker -f Dockerfile.windows . |
|
| 6 |
+# |
|
| 7 |
+# # Mount your source in an interactive container for quick testing: |
|
| 8 |
+# docker run -it -v ${pwd}\bundles:c:/go/src/github.com/docker/docker/bundles docker cmd
|
|
| 9 |
+# |
|
| 10 |
+ |
|
| 11 |
+FROM windowsservercore |
|
| 12 |
+ |
|
| 13 |
+ENV GOLANG_VERSION=1.5.2 \ |
|
| 14 |
+ GIT_VERSION=2.7.0 \ |
|
| 15 |
+ RSRC_COMMIT=e48dbf1b7fc464a9e85fcec450dddf80816b76e0 \ |
|
| 16 |
+ GOPATH=C:/go;C:/go/src/github.com/docker/docker/vendor \ |
|
| 17 |
+ FROM_DOCKERFILE=1 |
|
| 18 |
+ |
|
| 19 |
+WORKDIR c:/windows/temp |
|
| 20 |
+ |
|
| 21 |
+RUN powershell -command \ |
|
| 22 |
+ sleep 2 ; \ |
|
| 23 |
+ iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
| 24 |
+ |
|
| 25 |
+RUN powershell -command \ |
|
| 26 |
+ sleep 2 ; \ |
|
| 27 |
+ choco install curl -y -v ; \ |
|
| 28 |
+ choco install git -y -v --version=%GIT_VERSION% -params '"/GitAndUnixToolsOnPath"' |
|
| 29 |
+ |
|
| 30 |
+RUN setx /M Path "c:\ProgramData\chocolatey\bin;c:\Program Files\Git\usr\bin;%Path%;c:\gcc\bin" |
|
| 31 |
+ |
|
| 32 |
+RUN powershell -command \ |
|
| 33 |
+ sleep 2; \ |
|
| 34 |
+ curl.exe -L -k -o go.msi https://storage.googleapis.com/golang/go%GOLANG_VERSION%.windows-amd64.msi; \ |
|
| 35 |
+ curl.exe -L -k -o gcc.zip http://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC%205%20series/5.1.0-tdm64-1/gcc-5.1.0-tdm64-1-core.zip ; \ |
|
| 36 |
+ curl.exe -L -k -o runtime.zip http://downloads.sourceforge.net/project/tdm-gcc/MinGW-w64%20runtime/GCC%205%20series/mingw64runtime-v4-git20150618-gcc5-tdm64-1.zip ; \ |
|
| 37 |
+ curl.exe -L -k -o binutils.zip http://downloads.sourceforge.net/project/tdm-gcc/GNU%20binutils/binutils-2.25-tdm64-1.zip |
|
| 38 |
+ |
|
| 39 |
+RUN powershell -command \ |
|
| 40 |
+ .\go.msi /quiet ; \ |
|
| 41 |
+ Expand-Archive gcc.zip \gcc -Force ; \ |
|
| 42 |
+ Expand-Archive runtime.zip \gcc -Force ; \ |
|
| 43 |
+ Expand-Archive binutils.zip \gcc -Force |
|
| 44 |
+ |
|
| 45 |
+RUN del go.msi gcc.zip runtime.zip binutils.zip |
|
| 46 |
+ |
|
| 47 |
+RUN powershell -Command \ |
|
| 48 |
+ sleep 2 ; \ |
|
| 49 |
+ git clone https://github.com/akavel/rsrc.git c:\go\src\github.com\akavel\rsrc ; \ |
|
| 50 |
+ cd \go\src\github.com\akavel\rsrc ; \ |
|
| 51 |
+ git checkout -q $env:RSRC_COMMIT ; \ |
|
| 52 |
+ go install -v |
|
| 53 |
+ |
|
| 54 |
+WORKDIR c:/go/src/github.com/docker/docker |
|
| 55 |
+ |
|
| 56 |
+COPY . /go/src/github.com/docker/docker |