git clone https://github.com/rroemhild/docker-ejabberd.git cd docker-ejabberd/ docker create foo Dockerfile
docker run --name "ejabberd" \
-p 5222:5222 \
-p 5269:5269 \
-p 5280:5280 \
-h 'xmpp.example.de' \
-e "XMPP_DOMAIN=example.de" \
-e "ERLANG_NODE=ejabberd" \
-e "[email protected] [email protected]" \
-e "[email protected]:password1234 [email protected]" \
"foo:baz"
On the docker-machine instance:
docker@default:~$ echo 4560 && curl http://127.0.0.1:4560
4560
curl: (7) Failed connect to 127.0.0.1:4560; Connection refused
docker@default:~$ echo 5222 && curl http://127.0.0.1:5222
5222
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3779925371' from='example.de' versi
on='1.0'><stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'></xml-not-well-formed></stream:error></stream:stream>dock
er@default:~$ echo 5269 && curl http://127.0.0.1:5269
5269
<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:server' xmlns:db='jabber:server:dialback' id='4
25504221'><stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'></xml-not-well-formed></stream:error></stream:stream>doc
ker@default:~$ echo 5280 && curl http://127.0.0.1:5280
5280
curl: (52) Empty reply from server
docker@default:~$ echo 5443 && curl http://127.0.0.1:5443
5443
curl: (7) Failed connect to 127.0.0.1:5443; Connection refused
So ports 5222 and 5269 are listening.
Lets try it on OSX:
Failed to connect to 127.0.0.1 port 4560: Connection refused
Failed to connect to 127.0.0.1 port 5222: Connection refused
Failed to connect to 127.0.0.1 port 5269: Connection refused
Failed to connect to 127.0.0.1 port 5280: Connection refused
Failed to connect to 127.0.0.1 port 5443: Connection refused
How to expose those ports to the OSX host
May be configured in one of these two files:
/Library/Preferences/VMware\ Fusion/vmnet8/nat.conf ~/.docker/machine/machines/default/default.vmx
useful commands
docker-machine inspect default | less
docker machine ip address : 192.168.191.132
docker network ls
docker network inspect 62201342d451 de66e8bee635 de66e8bee635
[~%]grep eth /Users/bryanhunt/.docker/machine/machines/default/default.vmx
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.virtualDev = "vmxnet3"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.pciSlotNumber = "192"
ethernet0.generatedAddress = "00:0c:29:a3:b9:04"
ethernet0.generatedAddressOffset = "0"
docker logs 6e03dcca5e45
stopped the docker-machine instance, into vmware gui, changed networking to bridged, started the machine.
[~%]docker-machine env default
Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.191.132:2376": dial tcp 192.168.191.132:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
[~%]docker-machine regenerate-certs default
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Error getting SSH command: Something went wrong running an SSH command!
command : cat /etc/os-release
err : exit status 255
output :
Looks like access to that image is hosed. Might need to restart the process.
Note there is a similar issue here: docker-archive/toolbox#273