From e53a6d051b7eb41f4e72847bd1df5ac8f51967be Mon Sep 17 00:00:00 2001 From: soxx Date: Sun, 23 Aug 2020 19:57:54 +0200 Subject: [PATCH] Refactor Dockerfile Extracted patch application into dedicated RUN step so we end up with an image right before patches are applied, which is conventient to debug. --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0f321e..0897c9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,9 @@ ARG KEYSTORE_PROPERTIES RUN curl -OL https://github.com/M66B/FairEmail/archive/$VERSION.tar.gz \ && tar xvzf $VERSION.tar.gz \ && cd FairEmail-$VERSION \ - && (for patch in /patches/*; do patch -p0 < $patch; done) \ && echo $KEYSTORE_FILE | base64 -d > keystore.jks \ - && echo $KEYSTORE_PROPERTIES | base64 -d > keystore.properties \ - && gradle --no-daemon assemble \ - && cp app/build/outputs/apk/full/github/FairEmail-v$VERSION-full-github.apk /apk + && echo $KEYSTORE_PROPERTIES | base64 -d > keystore.properties +RUN cd FairEmail-$VERSION \ + && (for patch in /patches/*; do patch -p0 < $patch; done) \ + && gradle --no-daemon assemble +RUN cp FairEmail-$VERSION/app/build/outputs/apk/github/release/FairEmail-v$VERSION-github-release.apk /apk