Skip to content

Docker on windows - Automatic rebuild not triggered on save from host #5212

Closed
@gavinbarron

Description

@gavinbarron

OS?

Windows 10 + Docker CE Version 17.03.0-ce-win1 (10296) + node:latest

Versions.

root@3c96e8d8df57:/app/test-app# node --version
v7.6.0
root@3c96e8d8df57:/app/test-app# ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.0-rc.1
node: 7.6.0
os: linux x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.9

Repro steps.

Run up a new docker container with a mounted drive from PowerShell
Install @angular/cli
create a new app
serve the app
make changes from a text editor in the host machine and save
the app does not re-transpile

Commands run are listed below (output removed for brevity)

> docker run -it -p 4200:4200 -p 49153:49153 -v ${pwd}:/app -w /app node /bin/bash
root@3c96e8d8df57:/app# npm i -g @angular/cli
root@3c96e8d8df57:/app# ng new test-app --skip-npm
root@3c96e8d8df57:/app# cd test-app
root@3c96e8d8df57:/app/test-app# npm i 
root@3c96e8d8df57:/app/test-app# ng serve --host 0.0.0.0

Once the app is up and running I open the app folder with VSCode on my host machine and edit a file, for example removing the production mode check in main.ts and save the changes.
I would expect that this action triggers a rebuild of the app as happens when I do this right on the windows host machine

The log given by the failure.

** NG Live Development Server is running on http://0.0.0.0:4200 **
Hash: 8525d0713016ab84cf21
Time: 9365ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 3.45 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 9.77 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.69 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.

Mention any other details that might be useful.

Following all of the steps performed inside the container on the host machine results in the expected behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions