I dockerized your application on an ubuntu VM. With my PC (Windows) I can view the interface on 'http://192.168.xxx.xxx:2007'. The "problem" (if it's one) is that I think the "compile on save" is really long, so I'm wondering if I correctly setup the container.
It takes about 40 to 45s to reload the interface after a file has been modified.
I tried to do it locally (on Windows, without docker and run it with "ng serve") and it only takes 10 or 11 seconds. Is it normal that it takes so long in a container ? Or have I missed something in the container configuration ? How can I not wait 40 seconds every time I change something to see the modifications?
Thanks in advance!
Container configuration
My Dockerfile (location = /www/pathToDockerFiles/ngx-admin)
FROM node:12
RUN mkdir /www
WORKDIR /www
EXPOSE 4200
CMD npm run start
# in package.json = "ng serve --host 0.0.0.0"
My docker-compose.yml file (location = /www/docker-compose.yml)
Get sources and install : git clone https://github.com/akveo/ngx-admin.git /www/pathToAppsFolders/my_front && cd /www/pathToAppsFolders/my_front && npm install
Build the image : cd /www/pathToDockerFiles/ && docker build -t my-ngx-admin -f ngx-admin .
Up containers and display : docker-compose up -d && clear && docker ps -a
Hi,
I dockerized your application on an ubuntu VM. With my PC (Windows) I can view the interface on 'http://192.168.xxx.xxx:2007'. The "problem" (if it's one) is that I think the "compile on save" is really long, so I'm wondering if I correctly setup the container.
It takes about 40 to 45s to reload the interface after a file has been modified. I tried to do it locally (on Windows, without docker and run it with "ng serve") and it only takes 10 or 11 seconds. Is it normal that it takes so long in a container ? Or have I missed something in the container configuration ? How can I not wait 40 seconds every time I change something to see the modifications?
Thanks in advance!
Container configuration
My Dockerfile (location = /www/pathToDockerFiles/ngx-admin)
My docker-compose.yml file (location = /www/docker-compose.yml)
Commands :
git clone https://github.com/akveo/ngx-admin.git /www/pathToAppsFolders/my_front && cd /www/pathToAppsFolders/my_front && npm install
cd /www/pathToDockerFiles/ && docker build -t my-ngx-admin -f ngx-admin .
docker-compose up -d && clear && docker ps -a