carlosperate / docker-qemu-rpi-os

Docker images with Raspberry Pi OS running on QEMU
MIT License
28 stars 5 forks source link

curl: (52) Empty reply from server #1

Closed albolizo closed 1 year ago

albolizo commented 1 year ago

Hi,

inside the docker-qemu-rpi-os container run as following: docker run -td -p 127.0.0.1:5022:5022 -p 127.0.0.1:8080:8080 carlosperate/qemu-rpi-os-lite I just installed apache2:

sudo apt-get update
sudo apt-get install apache2

From the Windows host I run: curl http://127.0.0.1:8080/ but I only get the following error message:

curl: (52) Empty reply from server

Do you have any idea why this happens? Thanks and regards

carlosperate commented 1 year ago

Are you actually running a server on the Raspberry Pi container? From those steps it looks like you have only installed it.

albolizo commented 1 year ago

It's running because curl http://127.0.0.1:8080/ in the guest machine works fine

carlosperate commented 1 year ago

Right, looks like the SSH port is forwarded by default, but any other ports need an update in the Qemu commands.

You can probably fork this repo (or dockerpi), apply this PR and then you should be able to forward that port: https://github.com/lukechilds/dockerpi/pull/32

Alternatively you could try serving on the SSH port to see if that works.