-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
- Loading branch information
Showing
5 changed files
with
125 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,17 @@ | ||
FROM resin/aarch64-golang:1.9 | ||
|
||
# Enable QEMU emulation | ||
ENTRYPOINT [ "qemu-aarch64-static", "-execve" ] | ||
SHELL [ "qemu-aarch64-static", "-execve", "/bin/sh", "-c" ] | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
btrfs-tools \ | ||
libapparmor-dev \ | ||
libdevmapper-dev \ | ||
libnl-3-dev \ | ||
libsystemd-dev | ||
|
||
COPY . /balena | ||
|
||
WORKDIR /balena |
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 @@ | ||
FROM resin/raspberrypi3-golang:1.9 | ||
|
||
# Enable QEMU emulation | ||
ENTRYPOINT [ "qemu-arm-static", "-execve" ] | ||
SHELL [ "qemu-arm-static", "-execve", "/bin/sh", "-c" ] | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
btrfs-tools \ | ||
libapparmor-dev \ | ||
libdevmapper-dev \ | ||
libnl-3-dev \ | ||
libsystemd-dev \ | ||
libsystemd-journal-dev | ||
|
||
COPY . /balena | ||
|
||
WORKDIR /balena |
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,13 @@ | ||
FROM i386/golang:1.9 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
btrfs-tools \ | ||
libapparmor-dev \ | ||
libdevmapper-dev \ | ||
libnl-3-dev \ | ||
libsystemd-dev | ||
|
||
COPY . /balena | ||
|
||
WORKDIR /balena |
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,40 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
|
||
case "$(go env GOARCH)" in | ||
"arm") | ||
arch="armv$(go env GOARM)" | ||
;; | ||
"arm64") | ||
arch="aarch64" | ||
;; | ||
"386") | ||
arch="i386" | ||
;; | ||
"amd64") | ||
arch="x86_64" | ||
;; | ||
esac | ||
|
||
version=$(git describe --tags --always) | ||
|
||
AUTO_GOPATH=1 ./hack/make.sh dynbinary-balena | ||
|
||
src="bundles/latest/dynbinary-balena" | ||
dst="balena" | ||
|
||
rm -rf "$dst" | ||
mkdir "$dst" | ||
|
||
cp -L "$src/balena" "$dst/balena" | ||
strip "$dst/balena" | ||
|
||
ln -s balena "$dst/balenad" | ||
ln -s balena "$dst/balena-containerd" | ||
ln -s balena "$dst/balena-containerd-ctr" | ||
ln -s balena "$dst/balena-containerd-shim" | ||
ln -s balena "$dst/balena-proxy" | ||
ln -s balena "$dst/balena-runc" | ||
|
||
tar czfv "balena-$version-$arch.tar.gz" "$dst" . |
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,37 @@ | ||
#!/bin/sh | ||
|
||
tag="17.06-rc5+testtag" | ||
|
||
machine=$(uname -m) | ||
|
||
case "$machine" in | ||
"armv5"*) | ||
arch="armv5" | ||
;; | ||
"armv6"*) | ||
arch="armv6" | ||
;; | ||
"armv7"*) | ||
arch="armv7" | ||
;; | ||
"armv8"*) | ||
arch="aarch64" | ||
;; | ||
"aarch64"*) | ||
arch="aarch64" | ||
;; | ||
"i386") | ||
arch="i386" | ||
;; | ||
"i686") | ||
arch="i386" | ||
;; | ||
"x86_64") | ||
arch="amd64" | ||
;; | ||
*) | ||
echo "Unknown machine type: $machine" | ||
exit 1 | ||
esac | ||
|
||
curl -sSL "https://github.com/resin-os/balena/releases/download/${tag}/balena-${tag}-${arch}.tar.gz" | tar tz |