From Toxic Butterfly, 2 Weeks ago, written in Bash.
  1. # Dockerfile (image)
  2. FROM alpine:3.9
  3. WORKDIR /app
  4. COPY package.json ./
  5. COPY package-lock.json ./
  6. RUN apk update; apk add npm; npm install
  7. CMD ["npm", "start"]
  8.  
  9. # docker compose
  10. version: '3'
  11. services:
  12.   frontend:
  13.     image:
  14.       instapy-dashboard
  15.     build: .
  16.     environment:
  17.       env_file: .env
  18.     container_name: 'instapy-dashboard-container'
  19.     ports:
  20.       - '3000:3000'
  21.     volumes:
  22.       - ./__tests__:/app
  23.       - ./public:/app
  24.       - ./src:/app
  25.      
  26. #
  27. # ERR
  28. #
  29. -> docker-compose -f docker-compose.yml up
  30. Starting instapy-dashboard-container ... done
  31. Attaching to instapy-dashboard-container
  32. instapy-dashboard-container | npm ERR! path /app/package.json
  33. instapy-dashboard-container | npm ERR! code ENOENT
  34. instapy-dashboard-container | npm ERR! errno -2
  35. instapy-dashboard-container | npm ERR! syscall open
  36. instapy-dashboard-container | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
  37. instapy-dashboard-container | npm ERR! enoent This is related to npm not being able to find a file.
  38. instapy-dashboard-container | npm ERR! enoent
  39. instapy-dashboard-container |
  40. instapy-dashboard-container | npm ERR! A complete log of this run can be found in:
  41. instapy-dashboard-container | npm ERR!     /root/.npm/_logs/2019-05-11T13_06_47_871Z-debug.log
  42. instapy-dashboard-container exited with code 254
captcha