A demo how to setup flutter web in docker container. The demo code is from flutter official cookbook Animate the properties of a container. And the docker build web was learned and reference from building a flutter web container.
Use docker build the container image
docker build -t myanimate-web .
If you have some problem during cache, you can clean cache by this
docker build --no-cache -t myanimate-web .
Run the docker image with localhost 1200 port. You can change to any other port just replace it.
docker run -d -p 1200:80 --name myanimate myanimate-web
Here we go, open browser and go to http://localhost:1200/