Reputation: 25974
I am trying to docker the flutter example app, using the following:
flutter build web
Dockerfile:
FROM nginx:1.21.1-alpine
COPY ./web /usr/share/nginx/html
But it just shows a blank page - it runs fine with flutter run
, do you know how to run flutter web for production in container/Dockerfile?
Upvotes: 2
Views: 509
Reputation: 12373
You need to copy ./build/web
after building. The web
folder contains an empty index.html
, and used for adding JS dependancies..etc. The actual compiled folder should be inside build/web
/.
Upvotes: 2