From 37049faf258d13361163bcc93c3e7a36ad18fd7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 8 Feb 2017 10:46:30 +0100 Subject: [PATCH] [Docker] Update docu with new docker image tags (#302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update docker docu with new docker image tags Update from README.md at openhab/openhab-docker #90 Signed-off-by: Christian Häussler (github: @cniweb) * Switch back to chown openhab:openhab Signed-off-by: Christian Häussler (github: @cniweb) --- installation/docker.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/installation/docker.md b/installation/docker.md index 7a0596b32..c1e8b50cd 100644 --- a/installation/docker.md +++ b/installation/docker.md @@ -93,10 +93,10 @@ docker run \ -d \ --user= \ --restart=always \ - openhab/openhab:amd64 + openhab/openhab:- ``` -Where `` is the user ID number for the `openhab` user which you can obtain using the command `id openhab` and `` is the architecture of your system. +Where `` is the user ID number for the `openhab` user which you can obtain using the command `id openhab`, `` is the version of openHAB and `` is the architecture of your system. It is important that ID number is passed in as the ID for the `openhab` user inside the container will not match the id of the user on your host system and file permissions may be a bit odd (e.g. why does www-data own my openHAB config files?) See below for an explanation of the fields passed to docker and potential additional fields. @@ -135,14 +135,14 @@ ExecStart=/usr/bin/docker run --name=%n --net=host \ -v /opt/openhab/.java:/openhab/.java \ --device=/dev/ttyUSB0 \ --user= \ - openhab/openhab: + openhab/openhab:- ExecStop=/usr/bin/docker stop -t 2 %n ; /usr/bin/docker rm -f %n [Install] WantedBy=multi-user.target ``` -Where `` is the user ID number for the `openhab` user which you can obtain using the command `id openhab` and `` is the architecture of your system. +Where `` is the user ID number for the `openhab` user which you can obtain using the command `id openhab`, `` is the version of openHAB and `` is the architecture of your system. It is important that ID number is passed in as the ID for the `openhab` user inside the container will not match the id of the user on your host system and file permissions may be a bit odd (e.g. why does www-data own my openHAB config files?) Place this openhab2.service file into `/etc/systemd/system`. @@ -165,14 +165,22 @@ Finally run `sudo systemctl start openhab2.service` to start openHAB running. * `--user=` : sets the user that runs the processes inside the container to match the uid passed, makes sure the `openhab` user can read and write to all needed files * `--device=/dev/ttyUSB0` : location of my zwave controller, change and/or add more --device tags to pass all your devices needed by openHAB to the container * `--restart=always` : if the container crashes or the syetem reboots the container is restarted -* `openhab/openhab:amd64` : name of the Docker Image +* `openhab/openhab:-` : name of the Docker Image * `debug` : You can start the container with the command ``docker run -it openhab/openhab debug`` to get into the debug shell. You might need to mount additional volumes and parameters as described above. # Environment Variables +* `EXTRA_JAVA_OPTS`="" +* `LC_ALL`=en_US.UTF-8 +* `LANG`=en_US.UTF-8 +* `LANGUAGE`=en_US.UTF-8 * `OPENHAB_HTTP_PORT`=8080 * `OPENHAB_HTTPS_PORT`=8443 -* `EXTRA_JAVA_OPTS` +* `USER_ID`=9001 + +By default the openHAB user in the container is running with: + +* `uid=9001(openhab) gid=9001(openhab) groups=9001(openhab)` # Updating the Image @@ -197,10 +205,10 @@ rm -rf /opt/openhab/userdata/tmp Pull down the latest image: ```bash -docker pull openhab/openhab: +docker pull openhab/openhab:- ``` -where `` is your architecture. +where `` is the version of openHAB and `` is your architecture. Restart the container using the full command above. @@ -220,6 +228,8 @@ or docker exec -it openhab /openhab/runtime/bin/client ``` +The default password for the login is ``habopen``. + Run `bundle:update ` where `` is the ID of the addon as listed when you run `bundle:list` Repeat step 2 for all bindings