From 5b5ec37de6170ac571d72bba8b2bd19c0bc0632a Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 7 Oct 2023 23:16:17 +0200 Subject: [PATCH] Add some comments --- .woodpecker.yml | 21 +++++++++++++-------- Dockerfile | 13 ++++++------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 5ec2fc1..25b9273 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,19 +1,24 @@ -variables: - - &flutter_version '3.13.6' - steps: docker-build: image: woodpeckerci/plugin-docker-buildx settings: + # Push to my registry repo: git.polynom.me/papatutuwawa/docker-flutter registry: git.polynom.me - platforms: linux/arm64/v8 - tag: *flutter_version - build_args: - - FLUTTER_VERSION=3.13.6 - auto_tag: true username: from_secret: repository_username password: from_secret: repository_password + # Build only for ARM64 + platforms: linux/arm64/v8 + # Build the correct version + build_args: + - FLUTTER_VERSION=3.13.6 + # Tag : and :latest + tag: 3.13.6 + auto_tag: true + # Save storage + purge: true secrets: [ repository_username, repository_password ] + when: + event: [push] diff --git a/Dockerfile b/Dockerfile index a72db0d..de76824 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,18 +3,17 @@ FROM debian:bookworm-20230919-slim # The version of Flutter to use ARG FLUTTER_VERSION -RUN echo $FLUTTER_VERSION - -# Set environment variables +# Add Flutter to the PATH ENV PATH="$PATH:/opt/flutter/bin" +# It turns out that the provided tarballs all expect x86 and thus bundle +# the x86 build of Dart, which obviously does not work. Thus, we have to +# fetch the repo from Github and use that instead. Then Flutter fetches the +# correct Dart build and everything should work. RUN apt-get update && apt-get install -y git curl unzip RUN mkdir -p /opt && \ git clone --depth=1 -b $FLUTTER_VERSION https://github.com/flutter/flutter.git /opt/flutter -# Install Flutter's Linux dependencies and pre-cache dependencies -#RUN apt-get install clang cmake ninja-build pkg-config libgtk3-dev liblzma-dev libstdc++-12-dev && \ -# flutter precache && \ -# rm -rf /var/lib/apt/lists/* +# Pre-cache dependencies RUN flutter precache && \ rm -rf /var/lib/apt/lists/*