Skip to content

Commit be88529

Browse files
qqgg231ludeeus
authored andcommitted
edited to follow documentation standards (home-assistant#7766)
1 parent 58f6d50 commit be88529

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/_docs/installation/docker.markdown

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ footer: true
1010
redirect_from: /getting-started/installation-docker/
1111
---
1212

13-
Installation with Docker is straightforward. Adjust the following command so that `/path/to/your/config/` points at the folder where you want to store your configuration and run it:
13+
Installation with Docker is straightforward. Adjust the following command so that `/PATH_TO_YOUR_CONFIG` points at the folder where you want to store your configuration and run it:
1414

1515
### {% linkable_title Linux %}
1616

1717
```bash
18-
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
18+
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
1919
```
2020

2121
### {% linkable_title Raspberry Pi 3 (Raspbian) %}
2222

2323
```bash
24-
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/raspberrypi3-homeassistant
24+
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/raspberrypi3-homeassistant
2525
```
2626

27-
You need to replace `/path/to/your/config` with your path to the configuration, for example if you choose your configuration path to be `/home/pi/homeassistant`, then command would be:
27+
You need to replace `/PATH_TO_YOUR_CONFIG` with your path to the configuration, for example if you choose your configuration path to be `/home/pi/homeassistant`, then command would be:
2828

2929
```bash
3030
$ docker run -d --name="home-assistant" -v /home/pi/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/raspberrypi3-homeassistant
@@ -37,15 +37,15 @@ When using `docker-ce` (or `boot2docker`) on macOS, you are unable to map the lo
3737
If you wish to browse directly to `http://localhost:8123` from your macOS host, meaning forward ports directly to the container, replace the `--net=host` switch with `-p 8123:8123`. More detail can be found in [the docker forums](https://forums.docker.com/t/should-docker-run-net-host-work/14215/10).
3838

3939
```bash
40-
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -e "TZ=America/Los_Angeles" -p 8123:8123 homeassistant/home-assistant
40+
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -e "TZ=America/Los_Angeles" -p 8123:8123 homeassistant/home-assistant
4141
```
4242

4343
Alternatively, `docker-compose` works with any recent release of `docker-ce` on macOS. Note that (further down this page) we provide an example `docker-compose.yml` however it differs from the `docker run` example above. To make the .yml directives match, you would need to make _two_ changes: first add the equivalent `ports:` directive, then _remove_ the `network_mode: host` section. This is because `Port mapping is incompatible with network_mode: host:`. More details can be found at [Docker networking docs](https://docs.docker.com/engine/userguide/networking/#default-networks). Note also the `/dev/tty*` device name used by your Arduino etc. devices will differ from the Linux example, so the compose `mount:` may require updates.
4444

4545
### {% linkable_title Windows %}
4646

4747
```powershell
48-
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config -e "TZ=America/Los_Angeles" --net=host homeassistant/home-assistant
48+
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -e "TZ=America/Los_Angeles" --net=host homeassistant/home-assistant
4949
```
5050

5151
When running Home Assistant in Docker on Windows, you may have some difficulty getting ports to map for routing (since the `--net=host` switch actually applies to the hypervisor's network interface). To get around this, you will need to add port proxy ipv4 rules to your local Windows machine, like so (Replacing '192.168.1.10' with whatever your Windows IP is, and '10.0.50.2' with whatever your Docker container's IP is):
@@ -175,7 +175,7 @@ As the docker command becomes more complex, switching to `docker-compose` can be
175175
container_name: home-assistant
176176
image: homeassistant/home-assistant
177177
volumes:
178-
- /path/to/your/config:/config
178+
- /PATH_TO_YOUR_CONFIG:/config
179179
- /etc/localtime:/etc/localtime:ro
180180
restart: always
181181
network_mode: host
@@ -198,7 +198,7 @@ $ docker-compose restart
198198
In order to use Z-Wave, Zigbee or other components that require access to devices, you need to map the appropriate device into the container. Ensure the user that is running the container has the correct privileges to access the `/dev/tty*` file, then add the device mapping to your docker command:
199199

200200
```bash
201-
$ docker run -d --name="home-assistant" -v /path/to/your/config:/config \
201+
$ docker run -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config \
202202
-v /etc/localtime:/etc/localtime:ro --device /dev/ttyUSB0:/dev/ttyUSB0 \
203203
--net=host homeassistant/home-assistant
204204
```
@@ -212,7 +212,7 @@ or in a `docker-compose.yml` file:
212212
container_name: home-assistant
213213
image: homeassistant/home-assistant
214214
volumes:
215-
- /path/to/your/config:/config
215+
- /PATH_TO_YOUR_CONFIG:/config
216216
- /etc/localtime:/etc/localtime:ro
217217
devices:
218218
- /dev/ttyUSB0:/dev/ttyUSB0

0 commit comments

Comments
 (0)