-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
Using docker for developing an Angular CLI app, running via ng serve inside the container does not detect file changes made on the host in a volume. Therfore I have to restart docker run everytime I made changes to files. Timestamp and content of the files though are updated in the container. So alternative I can use touch inside the container to rebuild but this is not really a satisfying development flow as I have to do this for every changed file.
Steps to reproduce the issue:
- Run
docker buildfor the Dockerfile given below - Start container with a volume pointing to a directory on the host
- Run
ng initinside of the container - Run
npm startinside of the container - Edit and save src files on the host
Describe the results you received:
Edited file and timestamp change inside of the container, but ng build process is not restarted,
Describe the results you expected:
Edited file and timestamp change inside of the container and ng build process gets restarted,
Additional information you deem important (e.g. issue happens only occasionally):
Thought first, this was a docker-compose issue but running the container without compose had the same results.
Output of docker version:
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: windows/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Wed Jan 11 00:23:16 2017
OS/Arch: linux/amd64
Output of docker info:
Containers: 68
Running: 0
Paused: 0
Stopped: 68
Images: 176
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 265
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.41-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.919 GiB
Name: moby
ID: YYNX:753B:ZI7R:HAY4:EVAG:WBK2:RD6P:YS7Y:Z67V:3SY3:JFUL:PLDQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 13
Goroutines: 23
System Time: 2017-01-12T15:08:14.0497198Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
WARNING: No kernel memory limit support
Insecure Registries:
127.0.0.0/8
Dockerfile
FROM node:latest
RUN apt-get update && apt-get install -y xvfb chromium
RUN npm install -g angular-cli
ENV APP_HOME /usr/src/app
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
EXPOSE 4200
CMD ["npm", "start"]