mirror of
https://github.com/lukechilds/dockerpi.git
synced 2026-01-23 10:16:42 +00:00
Update README.md
This commit is contained in:
parent
ca71ed7a8b
commit
a67bc86987
1 changed files with 4 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue