lukechilds / dockerpi

A Virtualised Raspberry Pi inside a Docker image
MIT License
1.85k stars 193 forks source link

Append New Port Forwarding #43

Open lmarschall opened 3 years ago

lmarschall commented 3 years ago

Not exactly an issue,

but I did not found any proper explanation here to enable custom port forwarding from inside the qemu emulator. So I decided to host this issue, if anyone wants to accomplish the same task.

To append a new port just add the following in the nic line of the entrypoint.sh file

,hostfwd=tcp::8000-:8000

and rebuild the container from the repository.

Cheers,

Luke

matteocarnelos commented 3 years ago

I've implemented a way to forward custom port using an environment variable in #32, check it out😉

lmarschall commented 3 years ago

Hey @matteocarnelos, thanks for the heads-up, I'll take a look into it, is it already merged into main branch?

matteocarnelos commented 3 years ago

Not yet, it is being reviewed