That was a stupid mistake. Everything worked well with docker. The problem was with Flask app, it is listening only for localhost by default. To make it listen to the network you need to set app.run(host= '0.0.0.0') So here is how it all works: • Boot2docker installs virtual machine to you mac. You could ssh into it with boot2docker ssh. Itunes export for mac. • That virtual machine is like a gateway to running containers. Each container is a virtual pc behind that gateway. If you ssh'ed to the vm, you could ping containers. To find out container's ip you should attach to it docker exec -it bash Now you're inside container. You could run ifconfig or ip addr show to see you container's ip. • Once you have container's ip you can ping it from vm. And try to connect to the exposed port. ( if you see 0.0.0.0:49155->5000/tcp in docker ps then to 5000) curl container_ip:container_port For me it refused to connect, however i could connect from container itself via curl localhost:5000 Thats how i figured it out. ![]() Hi there, When attempting to run the following command docker run -d -p 4444:4444 --net grid --name selenium-hub.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |