mirror of
https://github.com/gmeligio/flutter-docker-image.git
synced 2026-05-24 12:30:34 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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
|
||||
|
||||
+1
-1
@@ -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"]
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
## [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": "8b872868494e429d94fa06dca855c306438b22c0",
|
||||
"version": "3.38.6"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"flutter": {
|
||||
"channel": "stable",
|
||||
"commit": "f6ff1529fd6d8af5f706051d9251ac9231c83407",
|
||||
"version": "3.38.5"
|
||||
"commit": "8b872868494e429d94fa06dca855c306438b22c0",
|
||||
"version": "3.38.6"
|
||||
},
|
||||
"android": {
|
||||
"platforms": [
|
||||
|
||||
Generated
+7
-7
@@ -6437,9 +6437,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "19.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.1.tgz",
|
||||
"integrity": "sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==",
|
||||
"version": "19.2.3",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
||||
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
@@ -6447,15 +6447,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-dom": {
|
||||
"version": "19.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.1.tgz",
|
||||
"integrity": "sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==",
|
||||
"version": "19.2.3",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
|
||||
"integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^19.2.1"
|
||||
"react": "^19.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
|
||||
@@ -23,7 +23,7 @@ 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.38.6.
|
||||
* 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.
|
||||
@@ -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.38.6](https://hub.docker.com/r/gmeligio/flutter-android) |
|
||||
| GitHub Container Registry | [ghcr.io/gmeligio/flutter-android:3.38.6](https://github.com/gmeligio/flutter-docker-image/pkgs/container/flutter-android) |
|
||||
| Quay | [quay.io/gmeligio/flutter-android:3.38.6](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.38.6 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.38.6
|
||||
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.38.6
|
||||
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.38.6
|
||||
* Flutter version: 3.38.6
|
||||
|
||||
## 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.38.6
|
||||
* `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.38.6 --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 .
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
Reference in New Issue
Block a user