-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from j3ffrw/master
Add support for armv6 (Raspberry PI 1)
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -e exit if any command fails, -x print commands as they are executed | ||
set -ex | ||
# make output dir | ||
mkdir -p build/armv6 | ||
|
||
# set correct version | ||
GIT_COMMIT=`git rev-parse --short HEAD` | ||
GIT_TAG=`git describe --abbrev=0 --dirty` | ||
VERSION_STRING="$GIT_TAG ($GIT_COMMIT)" | ||
|
||
# build container | ||
docker buildx build --no-cache --progress plain -t "ogi-it/sdmon:latest" --platform linux/arm/v6 --build-arg "VERSION_STRING=${VERSION_STRING}" --load ./ | ||
|
||
# create container | ||
docker create --name sdmonbuild ogi-it/sdmon | ||
|
||
# copy | ||
docker cp sdmonbuild:/usr/src/app/sdmon ./build/armv6 | ||
base64 ./build/armv6/sdmon > ./build/armv6/sdmon.txt | ||
|
||
#cleanup | ||
docker container stop sdmonbuild | ||
docker container rm sdmonbuild | ||
docker image rm ogi-it/sdmon:latest |