Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Remove IP from docker-compose.vbox.yml bind #29

Open
ghost opened this issue Mar 20, 2018 · 6 comments
Open

Remove IP from docker-compose.vbox.yml bind #29

ghost opened this issue Mar 20, 2018 · 6 comments

Comments

@ghost
Copy link

ghost commented Mar 20, 2018

incorrect IP bind in docker-compose.vbox.yml, see below. changing to 2042:2042 in the Dockerfile resolves.

root@ubuntu:~/tools/newdir# git clone https://github.com/blacktop/docker-cuckoo.git
Cloning into 'docker-cuckoo'...
remote: Counting objects: 991, done.
remote: Total 991 (delta 0), reused 0 (delta 0), pack-reused 991
Receiving objects: 100% (991/991), 2.19 MiB | 0 bytes/s, done.
Resolving deltas: 100% (629/629), done.
Checking connectivity... done.
root@ubuntu:~/tools/newdir# cd docker-cuckoo/
root@ubuntu:~/tools/newdir/docker-cuckoo# docker-compose -f docker-compose.vbox.yml up
Starting dockercuckoo_mongo_1
Recreating dockercuckoo_cuckoo_1
Recreating dockercuckoo_elasticsearch_1
Starting dockercuckoo_postgres_1
Creating dockercuckoo_api_1
Recreating dockercuckoo_web_1

ERROR: for cuckoo  Cannot start service cuckoo: driver failed programming external connectivity on endpoint dockercuckoo_cuckoo_1 (3b2031976a7855e8e34f59a58e05d05dd05e8da42e7b4233abf6f50f514a03ad): Error starting userland proxy: listen tcp 192.168.56.1:2042: bind: cannot assign requested address
ERROR: Encountered errors while bringing up the project.
@ilyaglow
Copy link
Contributor

ilyaglow commented Mar 20, 2018

Hello, 192.168.56.1 is the default VirtualBox host-only interface’s IP-address. While it seems inconvenient to define it explicitly, I would say it is just the sane default that I set, because I’m not sure that anyone should ever expose ports to all interfaces. At the same time if your host-only iface doesn’t have an 192.168.56.1 ip, you gotta change config files anyway. But I do not insist on my approach, so it is up to @blacktop.

@pooki3bear
Copy link

Per doc; have Vboxweb running, have interface @192.168.65.1
image

Cannot bind to 192.168.56.1:2402

image

@blacktop
Copy link
Owner

I have seen weird behavior running docker as root in the past. It sounds like @0xpookie (or @pooki3bear when they are not at work? 😉) is running it the same way you were running it right @ilyaglow ?

@blacktop
Copy link
Owner

We could add more automation around detecting the VirtBox IP and auto setting it inside the container?

We could also auto set config based on env vars like I'm doing here: https://github.com/blacktop/docker-kafka-alpine/blob/master/1.0/scripts/configure-kafka.sh#L56

@ilyaglow
Copy link
Contributor

Sure, we can use env and pass it to an entrypoint script, which will do the stuff needed. The same approach could be applied for setting up vboxweb ip and user/pass pair.

@faker-DemoKing
Copy link

怎么扫描

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants