OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client
MIT License
608 stars 173 forks source link

Incorrect settings in Dockerfile #525

Open nathanielhourt opened 7 years ago

nathanielhourt commented 7 years ago

I've just spent several hours figuring out how to start the server using Docker. After immense frustration, I've finally succeeded, having solved two problems, both of which were broken settings in the docker files in the repo.

First problem: OpenBazaar does not listen to the public internet, but only to localhost. This is fixed by passing the arguments -a 0.0.0.0 to openbazaard. Fix by changing the final line of Dockerfile to:

CMD ["python", "openbazaard.py", "start", "-a", "0.0.0.0"]

Second problem: The docker-compose.yml file incorrectly exposes port 18469 as UDP, when OpenBazaar uses this port over TCP. This was insidiously difficult to figure out. You're welcome. Fix by exposing 18469 as TCP:

ports:
  - "18467:18467"
  - "18469:18469"
  - "18469:18469/udp"
  - "18466:18466"
  - "18470:18470"

Idk if it's necessary to leave it exposed over UDP or not, but I did so anyways.