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

pull/452/head
Albert Domenech 8 years ago committed by Anthony Lapenna
parent 2ef821f118
commit 0bacaef71a

@ -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

@ -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'

Loading…
Cancel
Save