Skip to content

Commit f322ab0

Browse files
Tabberize docker article a bit. (openhab#1581)
* Tabberize docker article a bit. Signed-off-by: Jerome Luckenbach <[email protected]> * Corrected tab syntax. Signed-off-by: Jerome Luckenbach <[email protected]> * Fix markdown errors. Signed-off-by: Jerome Luckenbach <[email protected]> * Add os note. Signed-off-by: Jerome Luckenbach <[email protected]>
1 parent 725f551 commit f322ab0

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

installation/docker.md

+52
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ The Image has a very minimal installation of Linux with no services running and
3939

4040
## Installation through Docker
4141

42+
::: tip Note
43+
Some explanations are valid for linux systems only, alltough some windows examples can be found below.
44+
:::
45+
4246
### Obtaining the Official image from DockerHub
4347

4448
[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/
7781
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).
7882
If using docker to manage the service, run the following command:
7983

84+
:::: tabs
85+
86+
::: tab Linux
87+
8088
```bash
8189
docker run \
8290
--name openhab \
@@ -94,6 +102,31 @@ docker run \
94102
openhab/openhab:<version>-<distribution>
95103
```
96104

105+
:::
106+
107+
::: tab Windows
108+
109+
```bash
110+
docker run ^
111+
--name openhab ^
112+
--net=host ^
113+
-v /etc/localtime:/etc/localtime:ro ^
114+
-v /etc/timezone:/etc/timezone:ro ^
115+
-v /opt/openhab/conf:/openhab/conf ^
116+
-v /opt/openhab/userdata:/openhab/userdata ^
117+
-v /opt/openhab/addons:/openhab/addons ^
118+
-d ^
119+
-e USER_ID=<uid> ^
120+
-e GROUP_ID=<gid> ^
121+
-e CRYPTO_POLICY=unlimited ^
122+
--restart=always ^
123+
openhab/openhab:<version>-<distribution>
124+
```
125+
126+
:::
127+
128+
::::
129+
97130
Where
98131

99132
- `<uid>` is the user ID number for the `openhab` user which you can obtain using the command `id openhab`,
@@ -229,13 +262,32 @@ If you want use an USB stick (for example for Z-Wave network), then it will be n
229262
In Docker openHAB is running in name of `openhab`, a restricted user.
230263
The stick will work if you run the following command right after docker image is started.
231264

265+
:::: tabs
266+
267+
::: tab Linux
268+
232269
```bash
233270
docker exec \
234271
-d \
235272
openhab \
236273
/bin/chmod o+rw /dev/ttyACM0
237274
```
238275

276+
:::
277+
278+
::: tab Windows
279+
280+
```bash
281+
docker exec ^
282+
-d ^
283+
openhab ^
284+
/bin/chmod o+rw /dev/ttyACM0
285+
```
286+
287+
:::
288+
289+
::::
290+
239291
This command changes permissions of the specific device as expected (readable and writable for everyone).
240292

241293
::: tip Note

0 commit comments

Comments
 (0)