I'am a beginner in Docker and I'am trying to run my source code in a Container with making my source-code folder as Volume to be able to modify source code in realtime.
My source code is a starter angular app
So my current repo contains :
DockerFile
angular-app/
#DockerFile:
FROM node:latest
LABEL author="Karim"
RUN npm install -g @angular/cli
WORKDIR /var/www/angular-app
ENTRYPOINT ["npm","start"]
in this repo I run :
> docker build -t angular-image .
> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
angular-image latest fcbcf2d10c65 58 minutes ago 989MB
> docker run -p 1000:4200 -v "C:\Users\k.garali\Desktop\Docker\angular-app-image/angular-app":/var/www/angular-app angular-image
> angular-app@0.0.0 start /var/www/angular-app
> ng serve
chunk {main} main.js, main.js.map (main) 56.9 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 141 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 12.5 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 2.38 MB [initial] [rendered]
Date: 2020-10-07T16:27:10.277Z - Hash: 17160092220a366bdbcb - Time: 18247ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
: Compiled successfully.
> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
7f9a2185636d angular-image "npm start" 2 seconds ago Up 2 seconds
0.0.0.0:1000->4200/tcp fervent_morse
But Finally when I go in browser to localhost:1000, I get no reponse ERR_EMPTY_RESPONSE
any clarification ?