Tabberize docker article a bit. (#1581)
* Tabberize docker article a bit. Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Corrected tab syntax. Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Fix markdown errors. Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Add os note. Signed-off-by: Jerome Luckenbach <github@luckenba.ch>pull/1585/head
parent
725f5515bf
commit
f322ab0ed1
|
@ -39,6 +39,10 @@ The Image has a very minimal installation of Linux with no services running and
|
|||
|
||||
## Installation through Docker
|
||||
|
||||
::: tip Note
|
||||
Some explanations are valid for linux systems only, alltough some windows examples can be found below.
|
||||
:::
|
||||
|
||||
### Obtaining the Official image from DockerHub
|
||||
|
||||
[Docker Hub](https://hub.docker.com/r/openhab/openhab/) has the basic information necessary to acquire and run the Docker image.
|
||||
|
@ -77,6 +81,10 @@ Note, always review the README on [Docker Hub](https://hub.docker.com/r/openhab/
|
|||
Services can be run an maintained on a Linux machine one of two ways, using Docker or using the system's built in service management (e.g. systemd).
|
||||
If using docker to manage the service, run the following command:
|
||||
|
||||
:::: tabs
|
||||
|
||||
::: tab Linux
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
--name openhab \
|
||||
|
@ -94,6 +102,31 @@ docker run \
|
|||
openhab/openhab:<version>-<distribution>
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: tab Windows
|
||||
|
||||
```bash
|
||||
docker run ^
|
||||
--name openhab ^
|
||||
--net=host ^
|
||||
-v /etc/localtime:/etc/localtime:ro ^
|
||||
-v /etc/timezone:/etc/timezone:ro ^
|
||||
-v /opt/openhab/conf:/openhab/conf ^
|
||||
-v /opt/openhab/userdata:/openhab/userdata ^
|
||||
-v /opt/openhab/addons:/openhab/addons ^
|
||||
-d ^
|
||||
-e USER_ID=<uid> ^
|
||||
-e GROUP_ID=<gid> ^
|
||||
-e CRYPTO_POLICY=unlimited ^
|
||||
--restart=always ^
|
||||
openhab/openhab:<version>-<distribution>
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
Where
|
||||
|
||||
- `<uid>` is the user ID number for the `openhab` user which you can obtain using the command `id openhab`,
|
||||
|
@ -229,6 +262,10 @@ If you want use an USB stick (for example for Z-Wave network), then it will be n
|
|||
In Docker openHAB is running in name of `openhab`, a restricted user.
|
||||
The stick will work if you run the following command right after docker image is started.
|
||||
|
||||
:::: tabs
|
||||
|
||||
::: tab Linux
|
||||
|
||||
```bash
|
||||
docker exec \
|
||||
-d \
|
||||
|
@ -236,6 +273,21 @@ docker exec \
|
|||
/bin/chmod o+rw /dev/ttyACM0
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::: tab Windows
|
||||
|
||||
```bash
|
||||
docker exec ^
|
||||
-d ^
|
||||
openhab ^
|
||||
/bin/chmod o+rw /dev/ttyACM0
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
This command changes permissions of the specific device as expected (readable and writable for everyone).
|
||||
|
||||
::: tip Note
|
||||
|
|
Loading…
Reference in New Issue