Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
matteocarnelos authored Sep 4, 2021
1 parent ca71ed7 commit a67bc86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ docker run -it lukechilds/dockerpi pi3

In some applications you may want to have access to some ports of the Raspberry Pi (e.g. for SSH connection). To do so, you can set the `QEMU_HOSTFWD` enviroment variable of the container by adding one or more entries, separated by spaces, in the standard QEMU format (`protocol::hostip:hostport-guestip:guestport`).

Example using the `docker run` command to expose the SSH port from the Raspberry Pi to the Container (`-e` part) and from the Container to the Host (`-p` part):
Example using the `docker run` command to expose the SSH and MQTT ports from the Raspberry Pi to the Container (`-e` part) and from the Container to the Host (`-p` part):

```
docker run -it -e QEMU_HOSTFWD=tcp::5022-:22 -p 5022:5022 lukechilds/dockerpi
docker run -it -e QEMU_HOSTFWD="tcp::5022-:22 tcp::1883-:1883" -p 5022:5022 -p 1883:1883 lukechilds/dockerpi
```

Example using the `docker-compose.yml` file to achieve the same result:
Expand All @@ -79,9 +79,10 @@ services:
dockerpi:
image: lukechilds/dockerpi
environment:
- QEMU_HOSTFWD=tcp::5022-:22
- QEMU_HOSTFWD=tcp::5022-:22 tcp::1883-:1883
ports:
- "5022:5022"
- "1883:1883"
```
## Wait, what?
Expand Down

0 comments on commit a67bc86

Please sign in to comment.