These windows images are based upon ltsc2019 and have have all dependencies installed to build flutter desktop apps for windows.
The images have an entrypoint script, which creates a release build of a flutter app mounted at C:\src
within a container. After building the app the result is copied to C:\src\build_container
.
Assuming the source of a flutter app is located at C:\myapp
on your system, the following command will create a windows build of it and put the result into C:\myapp\build_container
.
docker run --rm -v C:\myapp:C:\src tauu/flutter-windows-builder:latest
The following options can be specified as command line options to docker run
.
-example
Build the example app of a package mounted atC:\src
.-msix
Create a msix package after building the app. This requires that the msix package has been added as a dev dependency to the app.
The image can be used in a Gitlab CI job description to build a flutter app and provide the result build as an artifact.
build-windows:
stage: build
image:
name: flutter-windows-builder:latest
entrypoint: [""]
script:
- flutter clean
- flutter build windows --release
artifacts:
paths:
- build\windows\runner\Release\*
The Dockerfile to create the image has been inspired by the flutter-windows image created by Open Privacy.