services:

  container1:
    image: nginx
    links:
      - container2:container

  container2:
    image: nginx
    networks:
      default:
        aliases:
          - alias-of-container2
