diff --git a/watchdog/.gitignore b/watchdog/.gitignore index 745147fe..bbcd5920 100644 --- a/watchdog/.gitignore +++ b/watchdog/.gitignore @@ -1,3 +1,6 @@ fwatchdog watchdog fwatchdog-armhf +fwatchdog.exe +watchdog.exe + diff --git a/watchdog/Dockerfile b/watchdog/Dockerfile index de371d2a..4918fe93 100644 --- a/watchdog/Dockerfile +++ b/watchdog/Dockerfile @@ -6,10 +6,12 @@ COPY main.go . COPY readconfig.go . COPY config_test.go . COPY requesthandler_test.go . +COPY fastForkRequestHandler.go . +COPY requestHandler.go . COPY types types RUN go test -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog . - -RUN GOARM=6 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog-armhf . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog . \ + && GOARM=6 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog-armhf . \ + && GOOS=windows CGO_ENABLED=0 go build -a -installsuffix cgo -o watchdog.exe . diff --git a/watchdog/Dockerfile.armhf b/watchdog/Dockerfile.armhf deleted file mode 100644 index ecbf6ce2..00000000 --- a/watchdog/Dockerfile.armhf +++ /dev/null @@ -1,14 +0,0 @@ -FROM alexellis2/go-armhf:1.7.4 -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 get -d -v - -RUN go test -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog . diff --git a/watchdog/Dockerfile.win b/watchdog/Dockerfile.win deleted file mode 100644 index 4560069a..00000000 --- a/watchdog/Dockerfile.win +++ /dev/null @@ -1,14 +0,0 @@ -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 . diff --git a/watchdog/build.sh b/watchdog/build.sh index 165a5e16..55b8e823 100755 --- a/watchdog/build.sh +++ b/watchdog/build.sh @@ -12,6 +12,8 @@ fi docker create --name buildoutput functions/watchdog:build echo docker cp buildoutput:/go/src/github.com/alexellis/faas/watchdog/watchdog ./fwatchdog + docker cp buildoutput:/go/src/github.com/alexellis/faas/watchdog/watchdog-armhf ./fwatchdog-armhf +docker cp buildoutput:/go/src/github.com/alexellis/faas/watchdog/watchdog.exe ./fwatchdog.exe docker rm buildoutput