title: Fig up: Cannot find module - docker run works
body: <p>I'm trying to run <code>fig up</code> with a minimal node app.</p>
  
  <p>(edited: removed volumes from fig.yml)</p>
  
  <p>fig.yml:</p>
  
  <pre><code>example:
    build: .
    command: node server.js
    ports:
     - "4000:4000"
    links:
     - postgres
  postgres:
    image: postgres
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM node
  
  ADD . /src
  WORKDIR /src
  RUN npm install
  </code></pre>
  
  <p>server.coffee:</p>
  
  <pre><code>express = require 'express'
  app = express()
  
  app.get "/", (req, res) -&gt;
    res.send "Hello World"
  
  server = app.listen 4000, () -&gt;
    console.log 'Listening on port %d', server.address().port
  </code></pre>
  
  <p><code>fig build</code> proceeds as expected. <code>fig up</code> fails with:</p>
  
  <pre><code>example_1  | module.js:340
  example_1  |     throw err;
  example_1  |           ^
  example_1  | Error: Cannot find module '/src/server.js'
  example_1  |     at Function.Module._resolveFilename (module.js:338:15)
  example_1  |     at Function.Module._load (module.js:280:25)
  example_1  |     at Function.Module.runMain (module.js:497:10)
  example_1  |     at startup (node.js:119:16)
  example_1  |     at node.js:906:3
  </code></pre>
  
  <p>What I don't understand is that I can run the server in a container (that fig built) without fig:</p>
  
  <pre><code>$ docker run -it dockerexample_example /bin/bash
  root@58d25759047a:/# node /src/server.js 
  Listening on port 4000
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>$ docker run -it dockerexample_example
  Listening on port 4000
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>$ docker run -it -p 4000:4000 dockerexample_example
  Listening on port 4000
  </code></pre>
  
  <p>What is different about the way fig is trying to run this container?</p>
  
  <p>These files are available here: <a href="https://github.com/skyl/docker-example" rel="noreferrer">https://github.com/skyl/docker-example</a></p>