0

Here is what I have tried:

My goal: running the prosody XMPP server inside a container, accessed by my (as-yet uncontainerized) local development environment.

I installed the prosody XMPP server - this is what I am trying to use as a container for local development.

It comes dockerized here:

https://github.com/lloydwatkin/prosody-docker

I ran, as per documentation:

docker run -d prosody/prosody --name prosody -p 5222:5222

I checked prosody was running with docker exec -t -i /bin/bash

docker ps shows that the container is running, forward to 5222.

But, on my Mac local shell, telnetting to my boot2docker ip on port 5222 cannot connect.

I have tried this https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md

but I cannot get that to work.

To add to my confusion, the latest docker.com documentation states port forwarding should work, under Container Port Redirection:

https://docs.docker.com/installation/mac/

metalaureate
  • 7,572
  • 9
  • 54
  • 93
  • where are you telnetting from? the mac? no work-arounds should be needed for that case. What does `docker logs prosody` show? – Bryan Dec 19 '14 at 09:54
  • from the mac. `docker logs ebb217a6af8` returns no std out. I checked again via `docker exec -i -t ebb217a6af85 /bin/bash` that `telnet localhost 5222` connects fine inside the container. – metalaureate Dec 19 '14 at 17:50

2 Answers2

1

There was an error in the docker container documentation for prosody. The correct order of params are:

docker run -d --name prosody -p 5222:5222 prosody/prosody

There's no error handling so it was really difficult to identity.

metalaureate
  • 7,572
  • 9
  • 54
  • 93
0

Try running this command in Terminal to forward communication from your local machine's ports 5200 through 5299 to the VirtualBox's ports:

for i in {5200..5299}; do VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$iā€; VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i";done
cosbor11
  • 14,709
  • 10
  • 54
  • 69