Skip to content

This image provides a node container with NG CLI installed and support to build static Angular sites with Scully.

License

Notifications You must be signed in to change notification settings

bmeme/docker-ng-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release Bmeme NG-CLI container images Maintenance MIT license

NG-CLI packaged by Bmeme

This image provides a node container with NG CLI installed and support to build static Angular sites with Scully.

What is contained in the images

  • Angular CLI, of course
  • Chromium

Tagging policy

This repository contains a single "dynamic" Dockerfile that receives as arguments the major version of Node and the major version of the NG CLI. Consequently, the resulting image tag consists of a first number identifying the CLI version and a second number identifying the Node version. During the build process, the complete version of the NG CLI is extracted, allowing images to be tagged with the full NG CLI version (major-minor-patch). The image build process is automated on every merge to the main branch and scheduled to run at least once a week, ensuring a continuous refresh of images for the same major releases.

Supported NG-CLI and Node versions

  • NG-CLI 17.x.x with Node 18.x.x and 20.x.x
  • NG-CLI 16.x.x with Node 18.x.x and 16.x.x
  • NG-CLI 15.x.x with Node 18.x.x and 16.x.x

Get a look here: https://hub.docker.com/r/bmeme/ng-cli/tags

How to use this image

Manually

Creating your Angular environment an starting your Angular application is really simple:

docker run --rm -v "$PWD":/app bmeme/ng-cli ng new myangularapp

cd myangularapp
docker run --rm -v "$PWD":/app bmeme/ng-cli ng build

docker run --rm -p 4200:4200 -v "$PWD":/app bmeme/ng-cli ng serve --host 0.0.0.0

Using a Dockerfile

FROM bmeme/ng-cli:latest
COPY src/ /app

CMD ['ng', 'serve', '--host', '0.0.0.0']

Where src/ is the directory containing your Angular app.

Then, run the commands to build and run the Docker image:

$ docker build -t myangularcontainer:latest .
$ docker run -d --name myangularcontainer -p 4200:4200 myangularcontainer:latest

Using docker compose

services:
  php:
    image: bmeme/ng-cli:latest
    ports:
      - 4200:4200
    volumes:
      - .:/app
    command: ng serve --host 0.0.0.0

Credits

This project is a contribution of Bmeme :: The Digital Factory. This library is actually maintained by Daniele Piaggesi and Roberto Mariani. Any other contribution will be really appreciated.

About

This image provides a node container with NG CLI installed and support to build static Angular sites with Scully.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages