From b7c140eef6d2062728a8e66f6270e5f67e6547f0 Mon Sep 17 00:00:00 2001 From: Thomas Nuyken Date: Mon, 24 Jan 2022 22:03:41 +0100 Subject: [PATCH] Update README --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1119e7a..3a97318 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,48 @@ # flutter_pwa_test -A Flutter PWA test +A Flutter PWA test. ## Getting Started -This project is a starting point for a Flutter application. +Build with Flutter 2.8.1 from channel stable. -A few resources to get you started if this is your first Flutter project: +## Run as docker container -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) +### Build the docker image -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +```bash +cd +docker build -t . +``` + +### Transfer the image to another machine + +If you intent to run the container on a different machine, either upload it to a registry of your choice or save it as a tar-file and copy it as needed. If you intent to upload it to a registry, make sure you name it accordingly, e.g. docker.example.com/flutter-pwa-test:latest. + +```bash +docker push +``` + +```bash +docker save -o .tar +``` + +To import the tar-file on another machine: + +```bash +docker load -i .tar +``` + +### Run the image + +You can either run the image from the cli or using docker compose: + +```bash +docker run --rm -p 5000:80 --restart unless-stopped --name flutter-pwa-test +``` + +Assuming you are in the root of the project containing the `docker-compose.yml` file. Otherwise specify the file using the `-f` flag. + +```bash +docker-compose up -d +```