Build and serve your Angular application in development mode with Angular CLI
438
Build and serve your Angular application in development mode with ease, using this Docker image that comes with the Angular CLI tool and all necessary dependencies and tools.
ng serve --watch port 4200./app/node_modules - where the necessary modules are already installed and linked, saving you from having to create an extra node_modules folder./app - mount your local app folder here.docker image pull asaramet/angular
4200 to your local port of your choice (e.g. 80), and mount your local folder to the container using the -v option.For example, to mount the current working directory:
docker container run --rm -p 80:4200 -v $(pwd):/app asaramet/angular
Or, to mount the local folder /path/to/local/folder to the container's /app directory:
docker container run --rm -p 80:4200 -v /path/to/local/folder:/app asaramet/angular
# Get the container ID
docker container ls -a
# Start the container interactively
docker container exec -it <CONTAINER_ID> bash
# Run build or compile commands from your 'package.json', for example:
npm run compile
Content type
Image
Digest
sha256:5be13af25…
Size
350.7 MB
Last updated
over 3 years ago
docker pull asaramet/angular