You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Clarifies assumption that Raspberry Pi OS is 32-bit version.
2. Adds link to [Issue 375](#375) to record success with IOTstack on Orange Pi WinPlus.
3. Fixes a typo in "starting an individual container".
4. Removes Mosquitto as the example of a non-well-behaved container.
5. Adds a second `docker system prune` to the build scenario.
6. Explains why multiple `prune` commands are sometimes needed.
7. Adds section on version-pinning.
Copy file name to clipboardExpand all lines: docs/Getting-Started.md
+70-5Lines changed: 70 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Andreas Spiess Video #352: Raspberry Pi4 Home Automation Server (incl. Docker, O
15
15
IOTstack makes the following assumptions:
16
16
17
17
1. Your hardware is a Raspberry Pi (typically a 3B+ or 4B)
18
-
2. It has a reasonably-recent version of Raspberry Pi OS (aka "Raspbian") installed which has been kept up-to-date with:
18
+
2. It has a reasonably-recent version of 32-bit Raspberry Pi OS (aka "Raspbian") installed which has been kept up-to-date with:
19
19
20
20
```
21
21
$ sudo apt update
@@ -29,7 +29,13 @@ IOTstack makes the following assumptions:
29
29
30
30
The first five assumptions are Raspberry Pi defaults on a clean installation. The sixth is what you get if you follow these instructions faithfully.
31
31
32
-
> Please don't read these assumptions as saying that IOTstack will not run on other hardware, other operating systems, or as a different user. It is just that IOTstack gets most of its testing under these conditions. The further you get from these implicit assumptions, the more your mileage may vary.
32
+
Please don't read these assumptions as saying that IOTstack will not run on other hardware, other operating systems, or as a different user. It is just that IOTstack gets most of its testing under these conditions. The further you get from these implicit assumptions, the more your mileage may vary.
33
+
34
+
### <aname="otherPlatforms"> other platforms </a>
35
+
36
+
Users have reported success on other platforms, including:
37
+
38
+
*[Orange Pi WinPlus](https://github.com/SensorsIot/IOTstack/issues/375)
33
39
34
40
## <aname="newInstallation"> new installation </a>
35
41
@@ -375,7 +381,7 @@ You can also turn logging off or set it to use another option for any service by
375
381
376
382
### <aname="upContainer"> starting an individual container </a>
When InfluxDB starts, it sees that the folder on right-hand-side of the volumes mapping (`/var/lib/influxdb`) is empty and initialises new databases.
568
574
569
-
This is how **most** containers behave. But there are exceptions. A good example of an exception is Mosquitto which does not re-initialise correctly so you should avoid removing its persistent store.
575
+
This is how **most** containers behave. There are exceptions so it's always a good idea to keep a backup.
This causes DockerHub to be checked for the later version of the *base* image, downloading it as needed.
@@ -687,7 +694,7 @@ As your system evolves and new images come down from DockerHub, you may find tha
687
694
$ docker system prune
688
695
```
689
696
690
-
This recovers anything no longer in use.
697
+
This recovers anything no longer in use. Sometimes multiple `prune` commands are needed (eg the first removes an old *local* image, the second removes the old *base* image).
691
698
692
699
If you add a container via `menu.sh` and later remove it (either manually or via `menu.sh`), the associated images(s) will probably persist. You can check which images are installed via:
693
700
@@ -713,6 +720,64 @@ $ docker rmi dbf28ba50432
713
720
714
721
In general, you can use the repository name to remove an image but the Image ID is sometimes needed. The most common situation where you are likely to need the Image ID is after an image has been updated on DockerHub and pulled down to your Raspberry Pi. You will find two containers with the same name. One will be tagged "latest" (the running version) while the other will be tagged "\<none\>" (the prior version). You use the Image ID to resolve the ambiguity.
715
722
723
+
### <aname="versionPinning"> pinning to specific versions </a>
724
+
725
+
See [container image updates](#imageUpdates) to understand how to tell the difference between images that are used "as is" from DockerHub versus those that are built from local Dockerfiles.
726
+
727
+
Note:
728
+
729
+
* You should **always** visit an image's DockerHub page before pinning to a specific version. This is the only way to be certain that you are choosing the appropriate version suffix.
730
+
731
+
To pin an image to a specific version:
732
+
733
+
* If the image comes straight from DockerHub, you apply the pin in `docker-compose.yml`. For example, to pin Grafana to version 7.5.7, you change:
734
+
735
+
```
736
+
grafana:
737
+
container_name: grafana
738
+
image: grafana/grafana:latest
739
+
…
740
+
```
741
+
742
+
to:
743
+
744
+
```
745
+
grafana:
746
+
container_name: grafana
747
+
image: grafana/grafana:7.5.7
748
+
…
749
+
```
750
+
751
+
To apply the change, "up" the container:
752
+
753
+
```
754
+
$ cd ~/IOTstack
755
+
$ docker-compose up -d grafana
756
+
```
757
+
758
+
* If the image is built using a local Dockerfile, you apply the pin in the Dockerfile. For example, to pin Mosquitto to version 1.6.15, edit `~/IOTstack/.templates/mosquitto/Dockerfile` to change:
759
+
760
+
```
761
+
# Download base image
762
+
FROM eclipse-mosquitto:latest
763
+
…
764
+
```
765
+
766
+
to:
767
+
768
+
```
769
+
# Download base image
770
+
FROM eclipse-mosquitto:1.6.15
771
+
…
772
+
```
773
+
774
+
To apply the change, "up" the container and pass the `--build` flag:
775
+
776
+
```
777
+
$ cd ~/IOTstack
778
+
$ docker-compose up -d --build mosquitto
779
+
```
780
+
716
781
## <aname="nuclearOption"> the nuclear option - use with caution </a>
717
782
718
783
You can use Git to delete all files and folders to return your folder to the freshly cloned state.
0 commit comments