title: How to setup Docker Compose without a Dockerfile?
body: <p>I have spend the last few hours trying to setup 2 default images of nodejs 14 and rethinkdb 2.3.5, so sorry if the tone is a little frustrated but I am currently frustrated.</p>
  <p>My requirements are seemingly super simple.</p>
  <h3>I want to:</h3>
  <ol>
  <li>download the default images for nodejs 14 and rethinkdb 2.3.5</li>
  <li>copy everything from my current directory into the nodejs 14 image.</li>
  <li>I want the nodejs image to depend on the RethinkDB image.</li>
  <li>run 2 commands in the nodejs 14 image; <code>npm ci</code> and <code>npm test</code>.</li>
  <li>see the stdout from the tests.</li>
  </ol>
  <h3>I do not need:</h3>
  <ol>
  <li>any ports to be accessible to the host machine.</li>
  <li>to customize any Dockerfile or make any changes to the default images.</li>
  <li>any updates from the host machine file-system to the containers.</li>
  <li>to copy any data from the host machine to the RethinkDB container.</li>
  </ol>
  <h3>Why?</h3>
  <p>I want the tests to be reproducible across all developer machines - currently no CI. Regardless of where the developer has the project on their hard drive.</p>
  <p>I have a single <code>docker-compose.yml</code> file.</p>
  <pre class="lang-yaml prettyprint-override"><code>version: &quot;3&quot;
  services:
    tests:
      image: node:14
      ports:
        - &quot;3000:3000&quot;
      # command:
      #  - npm ci
      #  - npm test
      volumes:
        - &quot;.:/cli-app&quot;
      depends_on:
        - rethinkdb
  
    rethinkdb:
      image: rethinkdb
      ports:
        - &quot;28015:28015&quot;
        - &quot;8080:8080&quot;
      volumes:
        - &quot;./data: /data&quot;
      command: rethinkdb --bindall --data /data
  </code></pre>