https://github.com/plugfox/docker_flutter
Alpine Linux image for Flutter & Dart with helpful utils and web build support.
https://github.com/plugfox/docker_flutter
alpine alpine-linux android ci-cd continuous-integration crossplatform dart docker dockerfile flutter hub web
Last synced: about 1 month ago
JSON representation
Alpine Linux image for Flutter & Dart with helpful utils and web build support.
- Host: GitHub
- URL: https://github.com/plugfox/docker_flutter
- Owner: PlugFox
- License: mit
- Created: 2020-08-11T20:19:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-14T01:35:40.000Z (about 2 months ago)
- Last Synced: 2025-03-14T02:29:14.400Z (about 2 months ago)
- Topics: alpine, alpine-linux, android, ci-cd, continuous-integration, crossplatform, dart, docker, dockerfile, flutter, hub, web
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/plugfox/flutter
- Size: 87.9 KB
- Stars: 55
- Watchers: 6
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Flutter docker image
[](https://github.com/PlugFox/docker_flutter/actions/workflows/build_and_publish_tag.yml)
[](https://github.com/PlugFox/docker_flutter/pkgs/container/flutter)
[](https://hub.docker.com/r/plugfox/flutter/tags)
[](https://github.com/PlugFox/docker_flutter/blob/master/LICENSE)Docker Images for Flutter & Dart with useful utils and web build support.
Symlinks to dart, flutter in the folder: `/opt/flutter`
Release update strategy at every new flutter version.Android tags include the Android SDK and Flutter for Android development.
Web tags include the `minify` utility for web build optimization.### Environment variables
Base environment variables:
- USER: `flutter`
- WORKDIR: `/home/flutter`
- SHELL: `/bin/bash`
- FLUTTER_ROOT: `/opt/flutter`
- FLUTTER_HOME: `/opt/flutter`
- PUB_CACHE: `/var/cache/pub`Andoid SDK environment variables:
- ANDROID_HOME: `/opt/android`
- ANDROID_SDK_ROOT: `/opt/android`
- ANDROID_TOOLS_ROOT: `/opt/android`
- ANDROID_SDK_TOOLS_VERSION: `NNNNNNNN`
- ANDROID_PLATFORM_VERSION: `XX`
- ANDROID_BUILD_TOOLS_VERSION: `XX.0.0`### How to build locally
```bash
docker build --compress \
--file ./dockerfiles/flutter.dockerfile \
--build-arg VERSION=stable \
--tag plugfox/flutter:local .docker build --compress \
--file ./dockerfiles/flutter_web.dockerfile \
--build-arg VERSION=local \
--tag plugfox/flutter:local-web .
```### How to get shell
```bash
docker run --rm -it --name flutter_web \
-w /app \
plugfox/flutter:stable-web \
/bin/bash
```### How to check image
```bash
docker run --rm -it --name flutter_web \
-w /app \
-v /tmp/build:/app/build/web \
-v /tmp/cache:/var/cache/pub \
plugfox/flutter:stable-web \
/bin/bash -c "set -eux; flutter --version; dart --version; \
flutter create --org="dev.flutter" --project-name="example" \
--platforms=web --description="Example" . && \
flutter pub get && flutter build web --release && \
cd build/web && \
mv index.html index.src.html && \
minify --output index.html index.src.html"
```