Docker image with OpenJDK, Flutter, and Android SDK for building Flutter apps.
2.8K
This Docker image provides a complete setup with Flutter and Android SDK, tailored for building Flutter applications, including APKs for Android.
curl, git, and unzip.You can use this Docker image to build Flutter APKs by pulling the image and running the following commands.
DockerfileHere’s an example of how you can use this base image to build your Flutter APK:
FROM julesreyn/flutter-android-sdk:jdk24-android33-flutter3.24.3
USER root
WORKDIR /home/builder/app
COPY . .
RUN chown -R builder:builder /home/builder/app
USER builder
RUN flutter pub get
RUN flutter build apk --release
CMD ["tail", "-f", "/dev/null"]
docker build -t my-flutter-app .
docker run --rm -v "$PWD":/home/builder/app my-flutter-app
Your APK will be available in the build/app/outputs/flutter-apk/ directory of your project.
ANDROID_SDK_ROOT: Points to the Android SDK installation.FLUTTER_HOME: Path to the Flutter SDK installation.PATH: Ensures the Flutter and Android tools are available in the environment.To keep the image as lightweight as possible, several unused Flutter engine artifacts have been removed, including:
android-arm, android-arm64, etc.)darwin-x64, windows-x64, etc.)The following table shows available image versions. The latest tag points to the minimal base image.
| Docker Tag | JDK Version | Flutter Version | Android SDK | Artifacts Included | Image Size |
|---|---|---|---|---|---|
| jdk24-android33-flutter3.24.3 (latest) | OpenJDK 24 | 3.24.3 | 33.0.0 | None | 2.56GB |
| jdk24-android33-flutter3.24.3-full | OpenJDK 24 | 3.24.3 | 33.0.0 | All platforms | 2.56GB |
| jdk24-android33-flutter3.24.3-android-arm | OpenJDK 24 | 3.24.3 | 33.0.0 | android-arm | 2.56GB |
| jdk24-android33-flutter3.24.3-android-arm64 | OpenJDK 24 | 3.24.3 | 33.0.0 | android-arm64 | 2.56GB |
| jdk24-android33-flutter3.24.3-android-x64 | OpenJDK 24 | 3.24.3 | 33.0.0 | android-x64 | 2.56GB |
| jdk24-android33-flutter3.24.3-linux-x64 | OpenJDK 24 | 3.24.3 | 33.0.0 | linux-x64 | 2.56GB |
| jdk24-android33-flutter3.24.3-darwin-x64 | OpenJDK 24 | 3.24.3 | 33.0.0 | darwin-x64 | 2.56GB |
| jdk24-android33-flutter3.24.3-windows-x64 | OpenJDK 24 | 3.24.3 | 33.0.0 | windows-x64 | 2.56GB |
| jdk17-android33-flutter3.24.3 | OpenJDK 17 | 3.24.3 | 33.0.0 | None | 2.58GB |
| jdk17-android33-flutter3.24.3-full | OpenJDK 17 | 3.24.3 | 33.0.0 | All platforms | 2.58GB |
| jdk17-android33-flutter3.24.3-android-arm | OpenJDK 17 | 3.24.3 | 33.0.0 | android-arm | 2.58GB |
| jdk17-android33-flutter3.24.3-android-arm64 | OpenJDK 17 | 3.24.3 | 33.0.0 | android-arm64 | 2.58GB |
| jdk17-android33-flutter3.24.3-android-x64 | OpenJDK 17 | 3.24.3 | 33.0.0 | android-x64 | 2.58GB |
| jdk17-android33-flutter3.24.3-linux-x64 | OpenJDK 17 | 3.24.3 | 33.0.0 | linux-x64 | 2.58GB |
| jdk17-android33-flutter3.24.3-darwin-x64 | OpenJDK 17 | 3.24.3 | 33.0.0 | darwin-x64 | 2.58GB |
| jdk17-android33-flutter3.24.3-windows-x64 | OpenJDK 17 | 3.24.3 | 33.0.0 | windows-x64 | 2.58GB |
All images share the same base configuration but differ in included platform-specific artifacts:
Images are automatically built and pushed to Docker Hub via GitHub Actions when changes are made to the main branch.
This Docker image is maintained by Jules Reynaud. For any issues or contributions, feel free to reach out here : [email protected].
Content type
Image
Digest
sha256:99f25b2a9…
Size
2.6 GB
Last updated
almost 2 years ago
docker pull julesreyn/flutter-android-sdk