Skip to content

Firefly III: a personal finances manager

First triple arch build

James Cole51f25b2dce57
diff --git a/.deploy/docker/manifest.sh b/.deploy/docker/manifest.sh
index c3c911a310..8778582bb0 100755
--- a/.deploy/docker/manifest.sh
+++ b/.deploy/docker/manifest.sh
@@ -2,29 +2,42 @@
if [ "$TRAVIS_BRANCH" == "develop" ]; then
TARGET=jc5x/firefly-iii:develop
- IMAGENAME=jc5x/firefly-iii:develop-$ARCH
- docker manifest create $TARGET $IMAGENAME
- docker manifest annotate $TARGET $IMAGENAME --arch $ARCH --os linux
+ ARM32=jc5x/firefly-iii:develop-arm
+ ARM64=jc5x/firefly-iii:develop-arm64
+ AMD64=jc5x/firefly-iii:develop-amd64
+
+ docker manifest create $TARGET $ARM32 $ARM64 $AMD64
+ docker manifest annotate $TARGET $ARM32 --arch arm --os linux
+ docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
+ docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
fi
-echo "The version is $VERSION"
-
if [ "$TRAVIS_BRANCH" == "master" ]; then
TARGET=jc5x/firefly-iii:latest
- IMAGENAME=jc5x/firefly-iii:latest-$ARCH
+
+ ARM32=jc5x/firefly-iii:latest-arm
+ ARM64=jc5x/firefly-iii:latest-arm64
+ AMD64=jc5x/firefly-iii:latest-amd64
- docker manifest create $TARGET $IMAGENAME
- docker manifest annotate $TARGET $IMAGENAME --arch $ARCH --os linux
+ docker manifest create $TARGET $ARM32 $ARM64 $AMD64
+ docker manifest annotate $TARGET $ARM32 --arch arm --os linux
+ docker manifest annotate $TARGET $ARM64 --arch arm64 --os linux
+ docker manifest annotate $TARGET $AMD64 --arch amd64 --os linux
docker manifest push $TARGET
# and another one for version specific:
- TARGET=jc5x/firefly-iii:release-$VERSION
- IMAGENAME=jc5x/firefly-iii:release-$VERSION-$ARCH
+ VERSION_TARGET=jc5x/firefly-iii:release-$VERSION
- docker manifest create $TARGET $IMAGENAME
- docker manifest annotate $TARGET $IMAGENAME --arch $ARCH --os linux
- docker manifest push $TARGET
+ VERSION_ARM32=jc5x/firefly-iii:release-$VERSION-arm
+ VERSION_ARM64=jc5x/firefly-iii:release-$VERSION-arm64
+ VERSION_AMD64=jc5x/firefly-iii:release-$VERSION-amd64
+
+ docker manifest create $VERSION_TARGET $VERSION_ARM32 $VERSION_ARM64 $VERSION_AMD64
+ docker manifest annotate $VERSION_TARGET $VERSION_ARM32 --arch arm --os linux
+ docker manifest annotate $VERSION_TARGET $VERSION_ARM64 --arch arm64 --os linux
+ docker manifest annotate $VERSION_TARGET $VERSION_AMD64 --arch amd64 --os linux
+ docker manifest push $VERSION_TARGET
fi
diff --git a/.deploy/docker/travis.sh b/.deploy/docker/travis.sh
index f98f25443a..d3ff270048 100755
--- a/.deploy/docker/travis.sh
+++ b/.deploy/docker/travis.sh
@@ -11,4 +11,3 @@ docker version
# build everything
.deploy/docker/build-$ARCH.sh
-.deploy/docker/manifest.sh
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 14e8f25903..53e99a5385 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,14 +15,19 @@ jobs:
- dist: xenial
arch: amd64
env: ARCH=amd64 VERSION=4.8.1.8
+ stage: build
+ script: ./.deploy/travis.sh
- dist: xenial
arch: amd64
env: ARCH=arm VERSION=4.8.1.8
+ stage: build
+ script: ./.deploy/travis.sh
- dist: xenial
arch: arm64
env: ARCH=arm64 VERSION=4.8.1.8
-
-script:
- - echo $TRAVIS_DIST
- - echo $ARCH
- - .deploy/docker/travis.sh
+ stage: build
+ script: ./.deploy/travis.sh
+ - dist: xenial
+ arch: amd64
+ stage: manifest
+ script: ./.deploy/manifest.sh
\ No newline at end of file
diff --git a/Dockerfile.arm64 b/Dockerfile.arm64
index 3f397ee8a9..2f881d546a 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.arm64
@@ -1,33 +1,4 @@
-FROM arm64v8/php:7.3-apache-stretch
-ENV COMPOSER_ALLOW_SUPERUSER=1
-
-# Install stuff Firefly III runs with & depends on: php extensions, locales, dev headers and composer
-RUN apt-get update && apt-get install -y locales unzip && apt-get clean && rm -rf /var/lib/apt/lists/*
-
-# Script to run common extensions
-ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
-
-RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
- install-php-extensions --cleanup bcmath ldap gd pdo_pgsql pdo_sqlite pdo_mysql intl opcache memcached
-
-# common config
-RUN a2enmod rewrite && a2enmod ssl && \
- echo "el_GR.UTF-8 UTF-8\nhu_HU.UTF-8 UTF-8\nro_RO.UTF-8 UTF-8\nnb_NO.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\ncs_CZ.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \
- locale-gen && \
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
- composer global require hirak/prestissimo --no-plugins --no-scripts && \
- cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \
- sed -i 's/max_execution_time = 30/max_execution_time = 600/' /usr/local/etc/php/php.ini && \
- sed -i 's/memory_limit = 128M/memory_limit = 512M/' /usr/local/etc/php/php.ini
-
-# copy ca certs to correct location
-COPY ./.deploy/docker/local-build/cacert.pem /usr/local/ssl/cert.pem
-
-# copy Apache config to correct spot.
-COPY ./.deploy/docker/local-build/apache2.conf /etc/apache2/apache2.conf
-
-# Enable default site (Firefly III)
-COPY ./.deploy/docker/local-build/apache-firefly-iii.conf /etc/apache2/sites-available/000-default.conf
+FROM jc5x/firefly-iii-base-image:latest-arm
# See also: https://github.com/JC5/firefly-iii-base-image