Sign inSign up

codingcogs/flutter-web

By codingcogs

•Updated almost 3 years ago

flutter image with web feature installed

Image
1

357

codingcogs/flutter-web repository overview

As a DevOps specialist I hate flutter web! But I hate wasting time more than I hate flutter. I tried all available images for building flutter web applications and only liked cirruslabs/flutter⁠, they provide better and most stable version of flutter images compare to others and I only had a tiny problem with it:

Installation of web feature for flutter takes too long for an automation process !

So in CodingCogs⁠ We decided to make a pre built Flutter web Docker image. This Image!

In order to use this Image do as you do in your normal flutter web development and write your docker file like this:

# to build with canvaskit renderer
FROM codingcogs/flutter-web:latest as builder

WORKDIR /app

COPY . .

RUN flutter build web --web-renderer canvaskit --release

# Adding a file to nginx web server
FROM nginx:1.25.1-alpine as runner

COPY --from=builder /app/build/web /usr/share/nginx/html

or

# to build with html renderer
FROM codingcogs/flutter-web:latest as builder

WORKDIR /app

COPY . .

RUN flutter build web --web-renderer html --release

# Adding a file to nginx web server
FROM nginx:1.25.1-alpine as runner

COPY --from=builder /app/build/web /usr/share/nginx/html

With this Dockerfile your app would be available at port 80 of the container

Tag summary

Content type

Image

Digest

sha256:3735b412d…

Size

1005.4 MB

Last updated

almost 3 years ago

docker pull codingcogs/flutter-web