dante-sever fail to bind ip by interface name in docker container

I try the docker recently, but the dante-server seem not to work.


os: gentoo x86_64
docker version:

  • Can not connect to Mongo docker instance via mono client on mac
  • running docker request from php
  • Problems with Python3.4 in Docker
  • jhipster-docker : spring-boot does not terminate with control C
  • Getting custom workitem handlers into jBPM 6 docker images
  • Error: docker-engine-selinux conflicts with 2:container-selinux?
  • Client version: 1.1.0
    Client API version: 1.13
    Go version (client): go1.3
    Git commit (client): 79812e3
    Server version: 1.1.0
    Server API version: 1.13
    Go version (server): go1.3
    Git commit (server): 79812000

    DockerFile for customized image

    From centos:centos6
    RUN yum install -y curl
    RUN rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    RUN rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    RUN echo -e "[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/6/\$basearch/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/nginx.repo
    RUN yum install -y nginx tinyproxy dante-server mysql-server

    start container

    sudo docker run -i \
      --name="proxy" \
      -p 14000:3128 \
      -p 14001:4655 \
      -v ${confdir}/tinyproxy.conf:/etc/tinyproxy.conf \
      -v ${confdir}/dante-server.conf:/etc/sockd.conf \
      -v ${dantelogdir}:/var/log/socks \
      -v ${tinylogdir}:/var/log/tinyproxy \
      devel/centos6 /bin/bash -c "tinyproxy -c /etc/tinyproxy.conf;sockd -f /etc/sockd.conf"

    sockd configuration

    internal: eth0 port = 4655
    external: eth0
    logoutput: /var/log/socks/sockd.log
    socksmethod: none
    user.privileged: root
    user.notprivileged: root
    user.libwrap: root
    client pass {
        from: port 1-65535 to:
        clientmethod: none # match all idented users that also are in passwordfile
    socks pass {
        from: to:
      socksmethod: none

    The tinyproxy works well when i test it alone. The dante-server passes the configuration test, but log follow errors during the initiation:

    Aug 10 07:54:35 (1407653675.105641) sockd[12]: warning:
    bindinternal(): bind of address fe80::dc6f:d7ff:fe8f:fa59.46 55
    (address #2/2) for server to listen on failed: Cannot assign requested
    address Aug 10 07:54:35
    (1407653675.105650) sockd[12]: error: serverinit(): failed to bind
    internal addresses: Cannot assign requested address
    Aug 10 07:54:35 (1407653675.105672) sockd[12]: alert: mother[1/1]:
    shutting down

    The erros seems that dante-server can not bind to the ip resolved by the interface name **eth0*. Any help?

  • Xdebug on Docker doesn't work with PhpStorm
  • Docker is not correctly binding ports on windows
  • Spring boot app not work on AWS
  • How to manage code changes in rails with docker
  • Kitematic shows all docker images wrongly
  • How did docker daemon limit container's disk bandwidth like docker run --device-read-bps
  • One Solution collect form web for “dante-sever fail to bind ip by interface name in docker container”

    I have been running into the same problem. It seems like there is a >1sec delay in eth0 being set up when a container starts.
    What I have done is add a sleep to the entrypoint / run like this:

    ENTRYPOINT sleep 2 && sockd

    It seems to solve all the problems I have been having.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.