Run flutter web with docker. Command flutter not found

Your last image is nginx that doesn’t contain flutter stuff.

Just remove these lines

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

and install nginx distribution if you want further use it with flutter.

RUN apt update && apt install -y nginx

I also recommend place this line just after FROM cirrusci/flutter AS build statement.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top