0

I'm building my Node14.6 Angular7.2 project inside a laradock container. First of all, I went to laradock.io and made a git clone from laradock to my project

git clone https://github.com/Laradock/laradock.git

After that, the only relevant file from laradock I've changed was laradock/workspace/Dockerfile because I need angular/cli@7.2.2:

[ ${INSTALL_NPM_ANGULAR_CLI} = true ]; then \
        npm install -g @angular/cli@7.2.2 \

So, with only that little change, I started my containers using bellow code:

docker-compose up workspace apache2 mariadb
docker exec -it 9210e8d6ab25/bin/bash
ng new my-project
cd my-project
ng build --watch

This is a print to prove the well behave of the container by generating the projetc's build enter image description here enter image description here The project is builded ok but when I start to develop the code with VS Code the build isn't beeing updated.

Do someone have any clue to resolve it?

Dierp
  • 321
  • 2
  • 5
  • Where you say "I'm running this command" you have a PNG file instead of a command line; how do you run it? Where are you updating the code? Do you rebuild the underlying Docker images when you do make a change? Can you provide a [mcve] including any relevant configuration files or Docker setup? – David Maze Jul 23 '20 at 19:27
  • I edited my question. If you follow what I said above, you're gonna be able to reproduce the scenario. – Dierp Jul 23 '20 at 21:44

1 Answers1

0

I found the solution here: ng serve not detecting file changes automatically

I only had to add

--poll=2000

and the build command should be like:

ng build --watch --poll=2000
Dierp
  • 321
  • 2
  • 5