mirror of
https://github.com/openfaas/faas.git
synced 2025-06-12 10:16:46 +00:00
Make dockerfile multi-arch
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
fdb67e3d93
commit
1a78ec9234
3
watchdog/.gitignore
vendored
3
watchdog/.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
fwatchdog
|
fwatchdog
|
||||||
watchdog
|
watchdog
|
||||||
fwatchdog-armhf
|
fwatchdog-armhf
|
||||||
|
fwatchdog.exe
|
||||||
|
watchdog.exe
|
||||||
|
|
||||||
|
@ -6,10 +6,12 @@ COPY main.go .
|
|||||||
COPY readconfig.go .
|
COPY readconfig.go .
|
||||||
COPY config_test.go .
|
COPY config_test.go .
|
||||||
COPY requesthandler_test.go .
|
COPY requesthandler_test.go .
|
||||||
|
COPY fastForkRequestHandler.go .
|
||||||
|
COPY requestHandler.go .
|
||||||
COPY types types
|
COPY types types
|
||||||
|
|
||||||
RUN go test
|
RUN go test
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog .
|
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 . \
|
||||||
RUN 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 .
|
||||||
|
@ -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 .
|
|
@ -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 .
|
|
@ -12,6 +12,8 @@ fi
|
|||||||
|
|
||||||
docker create --name buildoutput functions/watchdog:build echo
|
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 ./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-armhf ./fwatchdog-armhf
|
||||||
|
docker cp buildoutput:/go/src/github.com/alexellis/faas/watchdog/watchdog.exe ./fwatchdog.exe
|
||||||
|
|
||||||
docker rm buildoutput
|
docker rm buildoutput
|
||||||
|
Loading…
x
Reference in New Issue
Block a user