title: npm run build does not create build directory on elasticbeanstalk
body: <p>I am still puzzled as to why the <code>npm run build</code> command on an elasticbeanstalk instance does not produce the build folder when when I build the dockerfile. Its definitely not a permissions issue as I can <code>mkdir</code> and touch new directory and file respectively. I even list it in the dockerfile and I can confirm that the build folder isn't there. 
  Also the npm install works and I cal see all the installed libraries in there</p>
  
  <p>However when I build the same dockerfile locally, I can see that it creates a <code>build</code> folder. So its definetely an environment issue. I read somewhere that sometimes npm install can time out on <code>t2.micro</code>. So I even upgraded to <code>t2.small</code>. Still the issue persists. 
  Can someone help me figure out as to what is going on here ?</p>
  
  <p>Below is my dockerfile</p>
  
  <pre><code>FROM node:alpine as builder
  WORKDIR '/app'
  COPY package.json ./
  RUN npm install
  COPY ./ ./
  RUN ls
  RUN pwd
  CMD ["npm", "run" ,"build"] 
  RUN mkdir varun
  RUN touch var
  RUN ls
  
  FROM nginx
  EXPOSE 80
  RUN pwd
  COPY --from=builder ./app/build /usr/share/nginx/html 
  </code></pre>
  
  <p>Below are the elasticbeanstalk logs</p>
  
  <pre><code>i-0276e4b74ee15c98f Severe  29 minutes  18  --  --  --  --  --  --  --  --  --  --  0.03    0.28    0.2 0.1 99.7    0.0
  Application update failed at 2018-12-29T06:18:23Z with exit status 1 and error: Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh failed.
  
  cat: Dockerrun.aws.json: No such file or directory
  cat: Dockerrun.aws.json: No such file or directory
  cat: Dockerrun.aws.json: No such file or directory
  alpine: Pulling from library/node
  7fc670963d22: Pull complete
  Digest: sha256:d2180576a96698b0c7f0b00474c48f67a494333d9ecb57c675700395aeeb2c35
  Status: Downloaded newer image for node:alpine
  Successfully pulled node:alpine
  Sending build context to Docker daemon 625.7kB 
  Step 1/15 : FROM node:alpine as builder
  ---&gt; 9036ebdbc59d
  Step 2/15 : WORKDIR '/app'
  ---&gt; Running in e623a08307d5
  Removing intermediate container e623a08307d5
  ---&gt; b4e9fe3e4b82
  Step 3/15 : COPY package.json ./
  ---&gt; cb5e6a9b109b
  Step 4/15 : RUN npm install
  ---&gt; Running in 8a00eb1143a5
  &amp;#27;[91mnpm&amp;#27;[0m&amp;#27;[91m &amp;#27;[0m&amp;#27;[91mWARN&amp;#27;[0m&amp;#27;[91m
  
  Removing intermediate container 8a00eb1143a5
  ---&gt; c568ef0a4bc3
  Step 5/15 : COPY ./ ./
  ---&gt; cfb3e22fc373
  Step 6/15 : RUN ls
  ---&gt; Running in f6aad2a0f22e
  Dockerfile
  Dockerfile.dev
  README.md
  docker-compose.yml
  node_modules
  package-lock.json
  package.json
  public
  src
  Removing intermediate container f6aad2a0f22e
  ---&gt; 016d1ded2f97
  Step 7/15 : RUN pwd
  ---&gt; Running in eaae644b1d96
  /app
  Removing intermediate container eaae644b1d96
  ---&gt; 61285a5062ea
  Step 8/15 : CMD ["npm", "run" ,"build"]
  ---&gt; Running in 5cbca2213f4f
  Removing intermediate container 5cbca2213f4f
  ---&gt; 8566953eebaa
  Step 9/15 : RUN mkdir varun
  ---&gt; Running in a078760b6dcb
  Removing intermediate container a078760b6dcb
  ---&gt; 34c25b5aab32
  Step 10/15 : RUN touch var
  ---&gt; Running in d725dafc9409
  Removing intermediate container d725dafc9409
  ---&gt; 70195ffecb54
  Step 11/15 : RUN ls
  ---&gt; Running in b96bc198883c
  Dockerfile
  Dockerfile.dev
  README.md
  docker-compose.yml
  node_modules
  package-lock.json
  package.json
  public
  src
  var
  varun
  Removing intermediate container b96bc198883c
  ---&gt; 1b205ffb5e3f
  Step 12/15 : FROM nginx
  latest: Pulling from library/nginx
  bbdb1fbd4a86: Pull complete
  Digest: sha256:304008857c8b73ed71fefde161dd336240e116ead1f756be5c199afe816bc448
  Status: Downloaded newer image for nginx:latest
  ---&gt; 7042885a156a
  Step 13/15 : EXPOSE 80
  ---&gt; Running in 412e17c44274
  Removing intermediate container 412e17c44274
  ---&gt; e1e1ea0c7dfb
  Step 14/15 : RUN pwd
  ---&gt; Running in 1bc298a11ef1
  /
  Removing intermediate container 1bc298a11ef1
  ---&gt; 291575f13e2f
  Step 15/15 : COPY --from=builder ./app/build /usr/share/nginx/html
  COPY failed: stat /var/lib/docker/devicemapper/mnt/e2b112f1a046c00990aa6fc01e9fabc9e147420a214682a06637ef8cbcb9414a/rootfs/app/build: no such file or directory
  Failed to build Docker image aws_beanstalk/staging-app, retrying...
  Sending build context to Docker daemon 625.7kB
  </code></pre>