mirror of
https://github.com/gmeligio/flutter-docker-image.git
synced 2026-05-24 12:30:34 +00:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c23cccc58 | |||
| efa0acab8d | |||
| 91397e9d5d | |||
| 9f9f25d973 | |||
| 42ed24d66b | |||
| a150926917 | |||
| 9ca459f18f | |||
| f5a346fd44 | |||
| d2ad78c488 | |||
| 47fde777f9 | |||
| 984bd43ec3 | |||
| 2bcda57469 | |||
| a06f9699b2 | |||
| 063998e122 | |||
| 95eb215ee8 | |||
| 0e2d25235e | |||
| 4c89b17e47 | |||
| 6ba4c8cfef | |||
| 58a2d212f3 | |||
| 127cbb632a | |||
| c19f914064 | |||
| b82eba5586 | |||
| c603e9ff57 | |||
| 223c7015e0 | |||
| 6a07a0c350 | |||
| c1e92cfff2 | |||
| 8ebf1d5f2d | |||
| e6de03067e | |||
| de1c26f02e | |||
| eff8b99ce8 | |||
| 2617bcbd9c | |||
| 601b8cafc4 | |||
| 3754d12911 | |||
| 2f9dd7c6ef | |||
| 77ab19fca2 | |||
| 2ceb305c23 |
@@ -0,0 +1,66 @@
|
||||
name: 'Clean Runner Disk'
|
||||
description: 'Cleans the GitHub Actions runner disk by removing unused packages and toolchains to free up space.'
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Show disk usage before cleaning
|
||||
run: df -h
|
||||
shell: bash
|
||||
- name: List installed packages before cleaning
|
||||
run: dpkg --get-selections | grep -v deinstall
|
||||
shell: bash
|
||||
- name: Clean runner disk
|
||||
run: |
|
||||
# Remove PHP
|
||||
sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
# Remove databases
|
||||
sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
# Remove apt packages
|
||||
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."
|
||||
# Remove Java (JDKs)
|
||||
sudo rm -rf /usr/lib/jvm
|
||||
# Remove .NET SDKs
|
||||
sudo rm -rf /usr/share/dotnet
|
||||
sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
# Remove Swift toolchain
|
||||
sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo rm -rf /usr/share/swift
|
||||
# Remove Haskell (GHC)
|
||||
sudo rm -rf /usr/local/.ghcup
|
||||
# Remove Julia
|
||||
sudo rm -rf /usr/local/julia*
|
||||
# Remove Android SDKs
|
||||
sudo rm -rf /usr/local/lib/android
|
||||
# Remove browsers
|
||||
sudo apt-get remove -y google-chrome-stable firefox --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo rm -rf /usr/local/share/chromium /opt/microsoft /opt/google
|
||||
# Remove cloud tools
|
||||
sudo rm -rf /opt/az
|
||||
sudo apt-get remove -y azure-cli mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
|
||||
# Remove PowerShell
|
||||
sudo apt-get remove -y powershell --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
|
||||
sudo rm -rf /usr/local/share/powershell
|
||||
# Remove CodeQL and other toolcaches
|
||||
sudo rm -rf /opt/hostedtoolcache
|
||||
# Remove Kubernetes
|
||||
sudo rm -rf /usr/local/bin/minikube
|
||||
# Remove Rust
|
||||
sudo rm -rf /home/runner/.rustup /etc/skel/.rustup
|
||||
shell: bash
|
||||
- name: Show disk usage after cleaning
|
||||
run: df -h
|
||||
shell: bash
|
||||
- name: Top-level directories after cleaning
|
||||
run: du -h -d1 / | sort -hr | head -n 20 || true
|
||||
shell: bash
|
||||
- name: Detailed file sizes after cleaning
|
||||
run: find / -type f -exec du -h {} + 2>/dev/null | sort -hr | head -n 1000 || true
|
||||
shell: bash
|
||||
- name: List installed packages after cleaning
|
||||
run: dpkg --get-selections | grep -v deinstall
|
||||
shell: bash
|
||||
@@ -38,14 +38,8 @@ jobs:
|
||||
const script = require('./script/setEnvironmentVariables.js')
|
||||
return await script({ core })
|
||||
|
||||
- name: Load image metadata
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
id: metadata
|
||||
with:
|
||||
images: |
|
||||
${{ env.IMAGE_REPOSITORY_PATH }}
|
||||
tags: |
|
||||
type=raw,value=${{ env.FLUTTER_VERSION }}
|
||||
- name: Clean runner disk
|
||||
uses: ./.github/actions/clean-runner-disk
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||
@@ -56,6 +50,15 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
|
||||
- name: Load image metadata
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
id: metadata
|
||||
with:
|
||||
images: |
|
||||
${{ env.IMAGE_REPOSITORY_PATH }}
|
||||
tags: |
|
||||
type=raw,value=${{ env.FLUTTER_VERSION }}
|
||||
|
||||
- name: Build image and push to local Docker daemon
|
||||
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
||||
with:
|
||||
|
||||
@@ -47,6 +47,9 @@ jobs:
|
||||
const script = require('./script/setEnvironmentVariables.js')
|
||||
return await script({ core })
|
||||
|
||||
- name: Clean runner disk
|
||||
uses: ./.github/actions/clean-runner-disk
|
||||
|
||||
- name: Load image metadata
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||||
id: metadata
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
/.env
|
||||
/test_app
|
||||
/.vscode
|
||||
/.vscode
|
||||
/.claude
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
FROM debian:13.2-slim@sha256:e711a7b30ec1261130d0a121050b4ed81d7fb28aeabcf4ea0c7876d4e9f5aca2 AS flutter
|
||||
FROM debian:13.2-slim@sha256:4bcb9db66237237d03b55b969271728dd3d955eaaa254b9db8a3db94550b1885 AS flutter
|
||||
|
||||
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
||||
|
||||
@@ -150,9 +150,9 @@ ENV ANDROID_HOME="$SDK_ROOT/android-sdk" \
|
||||
ENV PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$HOME/.local/bin"
|
||||
|
||||
# renovate: suite=bookworm depName=openjdk-17-jdk-headless
|
||||
ARG OPENJDK_17_JDK_HEADLESS_VERSION="17.0.17+10-1~deb12u1"
|
||||
ARG OPENJDK_17_JDK_HEADLESS_VERSION="17.0.19+10-1~deb12u2"
|
||||
# renovate: suite=trixie depName=sudo
|
||||
ARG SUDO_VERSION="1.9.16p2-3"
|
||||
ARG SUDO_VERSION="1.9.16p2-3+deb13u1"
|
||||
|
||||
USER root
|
||||
# Add debian 12 bookworm repository alongside debian 13 trixie to install Java 17
|
||||
|
||||
@@ -1,3 +1,73 @@
|
||||
## [3.41.8] - 2026-05-01
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.8 (#436)
|
||||
## [3.41.7] - 2026-05-01
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- *(deps)* Bump yaml from 2.8.2 to 2.8.3 (#432)
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.7 (#434)
|
||||
## [3.41.6] - 2026-03-27
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.6 (#431)
|
||||
## [3.41.5] - 2026-03-21
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.5 (#430)
|
||||
## [3.41.4] - 2026-03-19
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.4 (#429)
|
||||
## [3.41.2] - 2026-02-20
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.2 (#427)
|
||||
## [3.41.1] - 2026-02-16
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.1 (#426)
|
||||
## [3.41.0] - 2026-02-12
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.41.0 (#424)
|
||||
## [3.38.9] - 2026-01-30
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.38.9 (#420)
|
||||
## [3.38.8] - 2026-01-28
|
||||
|
||||
### 💼 Other
|
||||
|
||||
- Run npm update (#418)
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.38.8 (#419)
|
||||
## [3.38.7] - 2026-01-15
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(release)* Upgrade flutter to 3.38.7 (#416)
|
||||
## [3.38.6] - 2026-01-09
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- Clean runner disk (#412)
|
||||
- Clean runner disk on ci.yml (#413)
|
||||
- *(release)* Upgrade flutter to 3.38.6 (#415)
|
||||
## [3.38.5] - 2025-12-22
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"flutter": {
|
||||
"channel": "stable",
|
||||
"commit": "f6ff1529fd6d8af5f706051d9251ac9231c83407",
|
||||
"version": "3.38.5"
|
||||
"commit": "02085feb3f5d8a8156e5e28512b9d99351d510c0",
|
||||
"version": "3.41.8"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"flutter": {
|
||||
"channel": "stable",
|
||||
"commit": "f6ff1529fd6d8af5f706051d9251ac9231c83407",
|
||||
"version": "3.38.5"
|
||||
"commit": "02085feb3f5d8a8156e5e28512b9d99351d510c0",
|
||||
"version": "3.41.8"
|
||||
},
|
||||
"android": {
|
||||
"platforms": [
|
||||
@@ -17,7 +17,7 @@
|
||||
"version": "35.0.0"
|
||||
},
|
||||
"cmdlineTools": {
|
||||
"version": "19.0"
|
||||
"version": "20.0"
|
||||
},
|
||||
"ndk": {
|
||||
"version": "28.2.13676358"
|
||||
@@ -27,6 +27,6 @@
|
||||
}
|
||||
},
|
||||
"fastlane": {
|
||||
"version": "2.230.0"
|
||||
"version": "2.233.1"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+476
-5045
File diff suppressed because it is too large
Load Diff
@@ -23,10 +23,10 @@ The images includes the minimum tools to run Flutter and build apps. The version
|
||||
|
||||
## Features
|
||||
|
||||
* Installed Flutter SDK 3.38.5.
|
||||
* Installed Flutter SDK 3.41.8.
|
||||
* Analytics disabled by default, opt-in if `ENABLE_ANALYTICS` environment variable is passed when running the container.
|
||||
* Rootless user `flutter:flutter`, with permissions to run on Github workflows and GitLab CI.
|
||||
* Cached Fastlane gem 2.230.0.
|
||||
* Cached Fastlane gem 2.233.1.
|
||||
* Minimal image with predownloaded SDKs and tools ready to run `flutter` commands for the Android platform.
|
||||
|
||||
Predownloaded SDKs and tools in Android:
|
||||
@@ -40,15 +40,15 @@ Predownloaded SDKs and tools in Android:
|
||||
|
||||
| Registry | flutter-android |
|
||||
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Docker Hub | [gmeligio/flutter-android:3.38.5](https://hub.docker.com/r/gmeligio/flutter-android) |
|
||||
| GitHub Container Registry | [ghcr.io/gmeligio/flutter-android:3.38.5](https://github.com/gmeligio/flutter-docker-image/pkgs/container/flutter-android) |
|
||||
| Quay | [quay.io/gmeligio/flutter-android:3.38.5](https://quay.io/repository/gmeligio/flutter-android) |
|
||||
| Docker Hub | [gmeligio/flutter-android:3.41.8](https://hub.docker.com/r/gmeligio/flutter-android) |
|
||||
| GitHub Container Registry | [ghcr.io/gmeligio/flutter-android:3.41.8](https://github.com/gmeligio/flutter-docker-image/pkgs/container/flutter-android) |
|
||||
| Quay | [quay.io/gmeligio/flutter-android:3.41.8](https://quay.io/repository/gmeligio/flutter-android) |
|
||||
|
||||
On the terminal:
|
||||
|
||||
```bash
|
||||
# From GitHub Container Registry
|
||||
docker run --rm -it ghcr.io/gmeligio/flutter-android:3.38.5 bash
|
||||
docker run --rm -it ghcr.io/gmeligio/flutter-android:3.41.8 bash
|
||||
```
|
||||
|
||||
On a workflow in GitHub Actions:
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: ghcr.io/gmeligio/flutter-android:3.38.5
|
||||
image: ghcr.io/gmeligio/flutter-android:3.41.8
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -70,7 +70,7 @@ On a `.gitlab-ci.yml` in GitLab CI:
|
||||
|
||||
```yaml
|
||||
build:
|
||||
image: ghcr.io/gmeligio/flutter-android:3.38.5
|
||||
image: ghcr.io/gmeligio/flutter-android:3.41.8
|
||||
script:
|
||||
- flutter build apk
|
||||
```
|
||||
@@ -91,20 +91,20 @@ bundle exec fastlane
|
||||
|
||||
Every new tag on the flutter stable channel gets built. The tag is composed of the Flutter version used to build the image:
|
||||
|
||||
* Docker image: gmeligio/flutter-android:3.38.5
|
||||
* Flutter version: 3.38.5
|
||||
* Docker image: gmeligio/flutter-android:3.41.8
|
||||
* Flutter version: 3.41.8
|
||||
|
||||
## Building Locally
|
||||
|
||||
The android.Dockerfile expects a few arguments:
|
||||
|
||||
* `flutter_version <string>`: The version of Flutter to use when building. Example: 3.38.5
|
||||
* `flutter_version <string>`: The version of Flutter to use when building. Example: 3.41.8
|
||||
* `android_build_tools_version <string>`: The version of the Android SDK Build Tools to install. Example: 35.0.0
|
||||
* `android_platform_versions <list>`: The versions of the Android SDK Platforms to install, separated by spaces. Example: 36
|
||||
|
||||
```bash
|
||||
# Android
|
||||
docker build --target android --build-arg flutter_version=3.38.5 --build-arg fastlane_version=2.230.0 --build-arg android_build_tools_version=35.0.0 --build-arg android_platform_versions="36" -t android-test .
|
||||
docker build --target android --build-arg flutter_version=3.41.8 --build-arg fastlane_version=2.233.1 --build-arg android_build_tools_version=35.0.0 --build-arg android_platform_versions="36" -t android-test .
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
+3
-3
@@ -84,12 +84,12 @@ commandTests:
|
||||
excludedOutput:
|
||||
- Sending anonymous analytics information
|
||||
fileContentTests:
|
||||
- name: Android SDK Command-line Tools is version 19.0
|
||||
- name: Android SDK Command-line Tools is version 20.0
|
||||
path: /home/flutter/sdks/android-sdk/cmdline-tools/latest/source.properties
|
||||
expectedContents:
|
||||
- |-
|
||||
Pkg.Revision=19.0
|
||||
Pkg.Path=cmdline-tools;19.0
|
||||
Pkg.Revision=20.0
|
||||
Pkg.Path=cmdline-tools;20.0
|
||||
Pkg.Desc=Android SDK Command-line Tools
|
||||
- name: Dart and Flutter analytics are disabled
|
||||
path: /home/flutter/.dart-tool/dart-flutter-telemetry.config
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# escape=`
|
||||
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2025@sha256:7404f9a26420caf446b117b0bab158dd0ec45a0b4eb73a345137c33f20125094 as flutter
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2025@sha256:83374b6927f7945bb0933d03f158f84b03182017e2694fa23aedd24ea51434e4 as flutter
|
||||
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user