version: "2"
services:
  lein:
    build:
      context: .
    image: lynxtp/lein:2.6.1
    ports:
      - "5309:5309"
    volumes_from:
      - lein-volume
    volumes:
      - $PWD:/mnt/workdir
  lein-volume:
    image: lynxtp/ubuntu:15.10
    volumes:
      - /srv/lein

version: "2"
services:
  lein:
    build:
      context: .
    image: lynxtp/lein:2.6.1
    ports:
      - "5309:5309"
    volumes_from:
      - lein-volume
    volumes:
      - $PWD:/mnt/workdir
  lein-volume:
    image: lynxtp/ubuntu:16.04
    volumes:
      - /srv/lein

Use lynxtp/ubuntu:16.04 to build volume.
Use lynxtp/ubuntu:16.04 to build volume.
