Skip to content

Commit

Permalink
Merge pull request #10 from j3ffrw/master
Browse files Browse the repository at this point in the history
Add support for armv6 (Raspberry PI 1)
  • Loading branch information
Ognian authored Jul 21, 2023
2 parents 63a79fd + 408a4a4 commit 2b1e2c3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions buildwithdocker-armv6.sh
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

0 comments on commit 2b1e2c3

Please sign in to comment.