Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vergissberlin/flutter-build
Build flutter web apps
https://github.com/vergissberlin/flutter-build
Last synced: 6 days ago
JSON representation
Build flutter web apps
- Host: GitHub
- URL: https://github.com/vergissberlin/flutter-build
- Owner: vergissberlin
- License: mit
- Created: 2023-09-03T18:58:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T05:41:41.000Z (11 months ago)
- Last Synced: 2024-10-10T19:41:17.895Z (27 days ago)
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter-build
[![Docker](https://github.com/vergissberlin/flutter-build/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/vergissberlin/flutter-build/actions/workflows/docker-publish.yml)
Build Flutter **web apps** with Docker.
## Getting Started
### Using this as base for your own Dockerfile
```Dockerfile
FROM ghcr.io/vergissberlin/flutter-build:main as builder# Copy your code to the container
COPY . /app# Build the web app
RUN flutter build web --release# Start a new stage with nginx
FROM nginx:alpine-slim as webserver# Copy the build from the builder stage
COPY --from=builder /app/build/web /usr/share/nginx/html
```### Use it directly
```bash
docker run --rm -v $(pwd):/app -w /app ghcr.io/vergissberlin/flutter-build:main flutter build web --release
```### Use it within a gitlab-ci pipeline
```yaml
stages:
- build
build:
stage: build
image: ghcr.io/vergissberlin/flutter-build:main
script:
- flutter build web --release
artifacts:
paths:
- build/web
```