Nodemon doesn't restart

I have a nodemon running in a docker-container with a mounted volume on OSX. Nodemon is receiving the file-change but it doesn’t restart the server.

Output:

  • Getting wordpress docker to run on local host
  • How to use port forwarding to connect to docker container using DNS name
  • Postgres to Ubuntu Docker container linking not working
  • Access Host redis database from docker conatiner
  • How can I restart a docker image instead of restarting docker?
  • What alternatives are there to using npm install --unsafe?
  • Creating piclet_web_1...
    Attaching to piclet_web_1
    web_1 | 7 Sep 13:37:19 - [nodemon] v1.4.1
    web_1 | 7 Sep 13:37:19 - [nodemon] to restart at any time, enter `rs`
    web_1 | 7 Sep 13:37:19 - [nodemon] watching: *.*
    web_1 | 7 Sep 13:37:19 - [nodemon] starting node ./index.js
    web_1 | restify listening at http://[::]:80 //normal output of started node-app
    //file-change, which gets detected
    web_1 | 7 Sep 13:37:30 - [nodemon] restarting due to changes...
    //no output of restarted server
    

    Dockerfile:

    FROM node:0.12.7-wheezy
    EXPOSE 80
    
    RUN npm install nodemon -g
    
    ADD app /app
    WORKDIR app
    
    RUN npm install
    

    docker-compose.yml

    web:
      build: .
      ports:
        - "80:80"
      volumes:
        - ./app/lib:/app/lib
      links:
        - db
      command: "nodemon -L ./index.js"
    db:
      image: mongo:3.1.7
    

  • Docker compose builds image in one directory but not in another
  • Using S3FS in a docker container ran by the mesos containerizer
  • Changing permissions of added file to a Docker volume
  • Why does Docker ADD command not copy this file?
  • docker-compose setup doesn't allow container to connect to redis
  • Trying to pull image from private-repo.microsoft.com
  • One Solution collect form web for “Nodemon doesn't restart”

    I solved the issue by choosing another base-image for the container: node:0.12.7 instead of node:0.12.7-wheezy

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.