title: Multiple FROMs - what it means
body: <p>I want to build a docker image for the <a href="https://github.com/Linkurious/linkurious.js" rel="nofollow noreferrer">Linkurious</a> project on github, which requires both the Neo4j database, and Node.js to run.</p>
  <p>My first approach was to declare a base image for my image, containing Neo4j. The reference docs do not define &quot;base image&quot; in any helpful manner:</p>
  <blockquote>
  <p>Base image:
  An image that has no parent is a base image</p>
  </blockquote>
  <p>from which I read that I may only have a base image if that image has no base image itself.</p>
  <p>But what is a base image? Does it mean, if I declare neo4j/neo4j in a FROM directive, that when my image is run the neo database will automatically run and be available within the container on port 7474?</p>
  <p>Reading the <a href="https://docs.docker.com/engine/reference/builder/#from" rel="nofollow noreferrer">Docker reference</a> I see:</p>
  <blockquote>
  <p>FROM can appear multiple times within a single Dockerfile in order to create multiple images. Simply make a note of the last image ID output by the commit before each new FROM command.</p>
  </blockquote>
  <p>Do I want to create multiple images? It would seem what I want is to have a single image that contains the contents of other images e.g. neo4j and node.js.</p>
  <p>I've found no directive to declare dependencies in the reference manual. Are there no dependencies like in RPM where in order to run my image the calling context must first install the images it needs?</p>
  <p>I'm confused...</p>