title: Getting code inside the Docker container
body: <p>This is my Dockerfile:</p>
  
  <pre><code>FROM node:4
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  COPY code/* /usr/src/app/
  EXPOSE 3000
  VOLUME /usr/src/app/
  </code></pre>
  
  <p>And my Docker Compose file:</p>
  
  <pre><code>version: '2.0'
  services:
    my_service:
      build: .   
      volumes:
        - ./app:/usr/src/app
      ports:
        - 8102:3000
      working_dir: /usr/src/app/
      command: node src/app.js
      restart: always
  </code></pre>
  
  <p>When I make the build:</p>
  
  <pre><code>docker-compose build
  
  Building api_core
  Step 1 : FROM node:4
   ---&gt; 93b396996a16
  Step 2 : RUN mkdir -p /usr/src/app
   ---&gt; Using cache
   ---&gt; e1ee4fd2245d
  Step 3 : WORKDIR /usr/src/app
   ---&gt; Using cache
   ---&gt; 8824a653a9e4
  Step 4 : COPY code/* /usr/src/app/
   ---&gt; Using cache
   ---&gt; 5e4ee9901369
  Step 5 : EXPOSE 3000
   ---&gt; Using cache
   ---&gt; 0e10126e1651
  Step 6 : VOLUME /usr/src/app/
   ---&gt; Using cache
   ---&gt; c1f9d36d91bc
  Successfully built c1f9d36d91bc
  </code></pre>
  
  <p>And when I run I got this error:</p>
  
  <pre><code>docker-compose up 
  
  Error: Cannot find module '/usr/src/app/src/app.js
  </code></pre>
  
  <p>So Docker is telling me that it haven't found the app.js, so it is like the COPY was not working !</p>