From a67bc86987615556c045f06c30d6bfa62cb68cba Mon Sep 17 00:00:00 2001 From: Matteo Carnelos Date: Sat, 4 Sep 2021 19:22:58 +0200 Subject: [PATCH] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7593ddd..7cbf6ae 100644 --- a/README.md +++ b/README.md @@ -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?