Files
flutter-pwa-test/README.md

49 lines
1.1 KiB
Markdown
Raw Normal View History

2022-01-24 21:39:14 +01:00
# flutter_pwa_test
2022-01-24 22:03:41 +01:00
A Flutter PWA test.
2022-01-24 21:39:14 +01:00
## Getting Started
2022-01-24 22:03:41 +01:00
Build with Flutter 2.8.1 from channel stable.
2022-01-24 21:39:14 +01:00
2022-01-24 22:03:41 +01:00
## Run as docker container
2022-01-24 21:39:14 +01:00
2022-01-24 22:03:41 +01:00
### Build the docker image
2022-01-24 21:39:14 +01:00
2022-01-24 22:03:41 +01:00
```bash
cd <directory container the Dockerfile, i.e. the root of the project>
docker build -t <image-name> .
```
### 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 <image-name>
```
```bash
docker save -o <file-name>.tar <image-name>
```
To import the tar-file on another machine:
```bash
docker load -i <file-name>.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 <image-name>
```
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
```