-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the build to create images of the binaries for each of the supported platforms: darwin, armhf, arm64, windows, and x86_64 (linux) Also updated the travis file in order to push these images up to docker hub and create a manifest file for easy multi-arch image pulls Signed-off-by: Burton Rheutan <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM functions/of-watchdog:build as build | ||
FROM scratch | ||
|
||
ARG PLATFORM | ||
|
||
COPY --from=build /go/src/github.com/openfaas-incubator/of-watchdog/of-watchdog$PLATFORM ./fwatchdog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
export USR=$DOCKER_NS | ||
export TAG=$TRAVIS_TAG | ||
|
||
docker manifest create $USR/of-watchdog:$TAG \ | ||
$USR/of-watchdog:$TAG-darwin \ | ||
$USR/of-watchdog:$TAG-x86_64 \ | ||
$USR/of-watchdog:$TAG-armhf \ | ||
$USR/of-watchdog:$TAG-arm64 \ | ||
$USR/of-watchdog:$TAG-windows | ||
|
||
docker manifest annotate $USR/of-watchdog:$TAG --arch arm $USR/of-watchdog:$TAG-darwin | ||
docker manifest annotate $USR/of-watchdog:$TAG --arch arm $USR/of-watchdog:$TAG-armhf | ||
docker manifest annotate $USR/of-watchdog:$TAG --arch arm64 $USR/of-watchdog:$TAG-arm64 | ||
docker manifest annotate $USR/of-watchdog:$TAG --os windows $USR/of-watchdog:$TAG-windows | ||
|
||
docker manifest push $USR/of-watchdog:$TAG |