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:
There's no IP address assigned. is this correct? If not how I config it or where I did wrong?
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