0

I am working on OSx (sierra), Docker (docker toolbox). And this is the first time I am working on Docker. I have set up apache container. When I start this container, it returns following error in the log. (But the container is running.)

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.2. Set the 'ServerName' directive globally to suppress this message

This is my docker-compose.yml

apache:
  build:
    context: .
    dockerfile: ./Dockerfile
  volumes:
    - ./htdocs/:/var/www/vhosts/middlewarep.xyz/htdocs/
    - ./zend.conf:/etc/httpd/conf.d/zend.conf
  networks:
    widgets:
      ipv4_address: 172.15.1.7
  ports:
    - 89:80

If I run following command

MDTPLT0583:~ sam$ docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                        PORTS               NAMES
7dd2372dea7d        middlewaredocker_apache   "/apache/start.sh"       18 hours ago        Up 35 minutes                                     middlewaredocker_apache_1
9ceadf6d2574        panubo/vsftpd             "/entry.sh vsftpd"       19 hours ago        Exited (143) 11 minutes ago                       middlewaredocker_ftp_1
c27c0d7fd66a        0bd4809a04a1              "docker-entrypoint..."   21 hours ago        Exited (0) 12 minutes ago                         middlewaredocker_mongodb_1
MDTPLT0583:~ sam$ docker inspect 7dd2372dea7d | grep IPAddress
            "SecondaryIPAddresses": null,
            "IPAddress": "",
                    "IPAddress": "",

Questions:

  1. There's no IP address assigned. is this correct? If not how I config it or where I did wrong?

  2. I was tried to config ftp docker (panubo/vsftpd) container and ftp the files from middleware_apache_1 to ftp container.

    curl -T data/input/my-try-file.txt ftp://172.15.1.21 --user miduser:midpaswd
    

But this returns me curl: (7) Failed to connect to 172.15.1.21: Network is unreachable

Following is the part in docker-composer.yml for ftp container:

ftp:
  image: panubo/vsftpd
  env_file: docker-env/ftp.env
  networks:
    widgets:
      ipv4_address: 172.15.1.21
  ports:
    - "21:21"
  volumes:
    - ./htdocs/data/ftp:/var/www/vhosts/middlewarep.xyz/htdocs/data/ftp/

Output for [root@b6782a36a049 /]# ip a show :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
3: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN qlen 1
    link/gre 0.0.0.0 brd 0.0.0.0
4: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
5: ip_vti0@NONE: <NOARP> mtu 1332 qdisc noop state DOWN qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
6: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN qlen 1
    link/tunnel6 :: brd ::
7: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1
    link/sit 0.0.0.0 brd 0.0.0.0
8: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN qlen 1
    link/tunnel6 :: brd ::
9: ip6gre0@NONE: <NOARP> mtu 1448 qdisc noop state DOWN qlen 1
    link/[823] 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
Robert
  • 33,429
  • 8
  • 90
  • 94
Sadee
  • 3,010
  • 35
  • 36
  • Get inside the container `docker exec -it 7dd2372dea7d bash` and see what you can debug. Check output of `ip a show` and other things you can use for debugging and update the post – Tarun Lalwani Aug 02 '17 at 10:50
  • @TarunLalwani I have updated by the results of ip a show – Sadee Aug 02 '17 at 10:57
  • Ok, could be a issue with your docker installation. See if you could remove and reinstall docker-toolbox – Tarun Lalwani Aug 02 '17 at 12:06

0 Answers0