Windows port - spike (#66)

* Add Windows Dockerfile.win
* Create appveyor.yml
* Create build.ps1
* Port Golang example to Windows
This commit is contained in:
Alex Ellis
2017-04-27 09:12:15 +01:00
committed by GitHub
parent abba90e674
commit 1eaf13c6c8
4 changed files with 48 additions and 0 deletions

14
watchdog/Dockerfile.win Normal file
View File

@ -0,0 +1,14 @@
FROM golang:1.7.5-windowsservercore
RUN mkdir -p /go/src/github.com/alexellis/faas/watchdog
WORKDIR /go/src/github.com/alexellis/faas/watchdog
COPY main.go .
COPY readconfig.go .
COPY config_test.go .
COPY requesthandler_test.go .
COPY types types
RUN go test
env CGO_ENABLED=0
env GOOS=windows
RUN go build -a -installsuffix cgo -o watchdog.exe .

6
watchdog/build.ps1 Normal file
View File

@ -0,0 +1,6 @@
pwd
cd watchdog
docker build -t alexellis2/watchdog:windows . -f .\Dockerfile.win
docker create --name watchdog alexellis2/watchdog:windows cmd
docker cp watchdog:/go/src/github.com/alexellis/faas/watchdog/watchdog.exe .