The difference between links/external_links in docker/compose
refer to:
http://blog.csdn.net/halcyonbaby/article/details/47904085
http://stackoverflow.com/questions/35154441/docker-compose-links-vs-external-links
Link two services so that they can communicate. The method is to set the domain name resolution of /etc/hosts.
external_links
Link with externally created containers (either by calling compose through other yml or manually created containers) so that they can communicate.
If you want to link a container inside of the docker-compose.yml to another container that was not included in the same docker-compose.yml or started in a different manner then you can use external_links and you would set the link to the container's name.