Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Nodemon inside a docker container requires the use of the legacy watch flag -L #378

Closed
drewterry opened this issue Nov 16, 2017 · 0 comments · Fixed by #382
Closed

Nodemon inside a docker container requires the use of the legacy watch flag -L #378

drewterry opened this issue Nov 16, 2017 · 0 comments · Fixed by #382

Comments

@drewterry
Copy link

drewterry commented Nov 16, 2017

** PLEASE ONLY USE THIS ISSUE TRACKER TO SUBMIT ISSUES WITH THE DOCKER LABS TUTORIAL CONTENT **

  • If you have a bug working with Docker itself, not related to these labs, please file the bug on the Docker repo *
  • If you would like general support figuring out how to do something with Docker, please use the Docker Slack channel. If you're not on that channel, sign up for the Docker Community and you'll get an invite. *
  • Or go to the Docker Forums *

Please provide the following information so we can assess the issue you're having

Which lab is it that you're having issues with?
https://github.com/docker/labs/tree/master/developer-tools/nodejs-debugging

Description

During the "Fix the bug" step, the nodemon tool doesn't catch file changes and restart the the app.

According to this post, and the nodemon documentation, when running nodemon inside a container, you have to use Legacy watch (-L).

This should be reflected in the docker-compose.yml file.

Steps to reproduce the issue, if relevant:

  1. Follow tutorial through "Run the app" step.
  2. Change the code on the development machine and save.
  3. Note that the website doesn't reflect change, and the docker-compose output doesn't register a change.

Describe the results you received:
No file change, app restart.

Describe the results you expected:
nodemon should register the file change, and restart the app.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:45:38 2017
 OS/Arch:      linux/amd64
 Experimental: true

Output of docker info:

Containers: 13
 Running: 0
 Paused: 0
 Stopped: 13
Images: 67
Server Version: 17.09.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan
 Log: awslogs fluentd gcplog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35
runc version: 3f2f8b84a77f73
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.49-moby
Operating System: Alpine Lin
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: PCDP:LLWT:C7DP:COTC:MMF2
Docker Root Dir: /var/lib/do
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 18
 Goroutines: 26
 System Time: 2017-11-16T16:
 EventsListeners: 0
Registry: https://index.dock
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
Docker for Windows
Windows 10 Pro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant