Permalink
Browse files

feat(images): initial aarch64/arm64 support (#447)

1 parent 2ef821f commit 0bacaef71a8479dae67c4841a391c2945b966c82 @adomenech73 adomenech73 committed with deviantony Jan 2, 2017
Showing with 36 additions and 0 deletions.
  1. +7 −0 build.sh
  2. +29 −0 gruntfile.js
View
@@ -27,6 +27,13 @@ cd /tmp/portainer-build-arm
tar cvpfz portainer-${VERSION}-linux-arm.tar.gz portainer
cd -
+grunt release-arm64
+rm -rf /tmp/portainer-build-arm64 && mkdir -pv /tmp/portainer-build-arm64/portainer
+mv dist/* /tmp/portainer-build-arm64/portainer
+cd /tmp/portainer-build-arm64
+tar cvpfz portainer-${VERSION}-linux-arm64.tar.gz portainer
+cd -
+
grunt release-macos
rm -rf /tmp/portainer-build-darwin && mkdir -pv /tmp/portainer-build-darwin/portainer
mv dist/* /tmp/portainer-build-darwin/portainer
View
@@ -74,6 +74,21 @@ module.exports = function (grunt) {
'usemin',
'clean:tmp'
]);
+ grunt.registerTask('release-arm64', [
+ 'clean:app',
+ 'if:unixArm64BinaryNotExist',
+ 'html2js',
+ 'useminPrepare',
+ 'recess:build',
+ 'concat',
+ 'clean:tmpl',
+ 'cssmin',
+ 'uglify',
+ 'copy',
+ 'filerev',
+ 'usemin',
+ 'clean:tmp'
+ ]);
grunt.registerTask('release-macos', [
'clean:app',
'if:darwinBinaryNotExist',
@@ -355,6 +370,14 @@ module.exports = function (grunt) {
'mv api/cmd/portainer/portainer-linux-arm dist/portainer'
].join(' && ')
},
+ buildUnixArm64Binary: {
+ command: [
+ 'docker run --rm -v $(pwd)/api:/src -e BUILD_GOOS="linux" -e BUILD_GOARCH="arm64" portainer/golang-builder:cross-platform /src/cmd/portainer',
+ 'shasum api/cmd/portainer/portainer-linux-arm64 > portainer-checksum.txt',
+ 'mkdir -p dist',
+ 'mv api/cmd/portainer/portainer-linux-arm64 dist/portainer'
+ ].join(' && ')
+ },
buildDarwinBinary: {
command: [
'docker run --rm -v $(pwd)/api:/src -e BUILD_GOOS="darwin" -e BUILD_GOARCH="amd64" portainer/golang-builder:cross-platform /src/cmd/portainer',
@@ -416,6 +439,12 @@ module.exports = function (grunt) {
},
ifFalse: ['shell:buildUnixArmBinary']
},
+ unixArm64BinaryNotExist: {
+ options: {
+ executable: 'dist/portainer'
+ },
+ ifFalse: ['shell:buildUnixArm64Binary']
+ },
darwinBinaryNotExist: {
options: {
executable: 'dist/portainer'

0 comments on commit 0bacaef

Please sign in to comment.