All Projects → trion-development → docker-ng-cli

trion-development / docker-ng-cli

Licence: other
Docker image for Angular CLI

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to docker-ng-cli

ng-universal-module
This is a Hapiness Engine for running Angular Apps on the server for server side rendering.
Stars: ✭ 18 (-71.43%)
Mutual labels:  angular-cli
angular-unit-testing-examples
Showroom for different Angular unit testing concepts
Stars: ✭ 19 (-69.84%)
Mutual labels:  angular-cli
angular-projects
A collection of projects built on the Angular framework
Stars: ✭ 17 (-73.02%)
Mutual labels:  angular-cli
react-tools-for-better-angular-apps
Use React ecosystem for unified and top notch DX for angular developement
Stars: ✭ 30 (-52.38%)
Mutual labels:  angular-cli
ngx-deploy-docker
Deploy your Angular Application to a Docker registry directly from the Angular CLI! 🚀
Stars: ✭ 14 (-77.78%)
Mutual labels:  angular-cli
angular-pwa
Angular 13 Example Progressive Web App (PWA)
Stars: ✭ 45 (-28.57%)
Mutual labels:  angular-cli
ng-webworker
Repository featuring a web worker running within Angular.
Stars: ✭ 14 (-77.78%)
Mutual labels:  angular-cli
angular-pwa-starter
Lightweight starter 'ng init' with added app shell features (sw-precache, web app manifest).
Stars: ✭ 22 (-65.08%)
Mutual labels:  angular-cli
fire-starter
Starter kit for the fireloop.io platform
Stars: ✭ 16 (-74.6%)
Mutual labels:  angular-cli
angular-karma test-explorer
vscode extension for easy angular testing and debugging
Stars: ✭ 67 (+6.35%)
Mutual labels:  angular-cli
ng-electron-devkit
Angular Webpack Build Facade for Electron
Stars: ✭ 12 (-80.95%)
Mutual labels:  angular-cli
ThinkApp
Test your knowledge with any of the available topic this fun and free Champion Quiz Master App. Save your time and effort by saving your queries & its resolutions
Stars: ✭ 15 (-76.19%)
Mutual labels:  angular-cli
ng-builders
Custom Angular CLI builders
Stars: ✭ 15 (-76.19%)
Mutual labels:  angular-cli
Expenses
Keep track of your expenses the smart way 💰
Stars: ✭ 15 (-76.19%)
Mutual labels:  angular-cli
ncg-crud-ngx-md
Angular 4+ Material Design CRUD/Admin app by NinjaCodeGen http://DNAfor.NET
Stars: ✭ 36 (-42.86%)
Mutual labels:  angular-cli
electron-angular-ngrx
An Angular (6x) Electron seed featuring @angular/cli, @ngrx/platform, and Typescript. Complete with HMR workflow
Stars: ✭ 39 (-38.1%)
Mutual labels:  angular-cli
okta-angular-openid-connect-example
Angular + Angular CLI with Authentication from OpenID Connect and Okta
Stars: ✭ 19 (-69.84%)
Mutual labels:  angular-cli
angular-animations
A sample application exploring the Angular animations module using Angular 8
Stars: ✭ 19 (-69.84%)
Mutual labels:  angular-cli
yang-schematics
Yet Another Angular Generator - based on @schematics/angular
Stars: ✭ 16 (-74.6%)
Mutual labels:  angular-cli
ngx-model-hacker-news-example
Example repository with Hacker News implementation using Angular, Angular Material & ngx-model
Stars: ✭ 27 (-57.14%)
Mutual labels:  angular-cli

docker ng-cli (Angular CLI Container Image)

Docker image for Angular CLI to use as build container.

Image on DockerHub: https://hub.docker.com/r/trion/ng-cli/

Currently this image uses Node 16 (npm 8) and node:lts-slim as base distribution.

The AngularCLI analytics feature is disabled by default to avoid problems in CI environments. If you want to opt-in, set the NG_CLI_ANALYTICS environment variable to an empty value.

More information, commercial support and training is available at https://www.trion.de/

Example usage

docker run -u $(id -u) --rm -v "$PWD":/app trion/ng-cli ng new MyDemo
cd MyDemo
docker run -u $(id -u) --rm -v "$PWD":/app trion/ng-cli ng build

To run the Angular CLI development server from docker you need to map the port and instruct Angular CLI to listen on all interfaces. For example use

cd MyDemo
docker run -u $(id -u) --rm -p 4200:4200 -v "$PWD":/app trion/ng-cli ng serve --host 0.0.0.0

If you want to clone additional git repositories, f.e. from package.json, and you run with a different user than uid 1000 you need to mount the passwd since git requires to resolve the uid.

docker run -u $(id -u) --rm -p 4200:4200 -v /etc/passwd:/etc/passwd -v "$PWD":/app trion/ng-cli npm install

Usage in a CI environment

To run Angular CLI unit tests in docker see docker-ng-cli-karma and docker-ng-cli-e2e projects and respective trion/ng-cli-karma and trion/ng-cli-e2e docker images.

Docker images for Angular karma unit tests and end to end tests with webdriver/selenium:

using yarn

This image contains yarn preinstalled and can be used as alternative package manager. If you want to use a shared cache directory for yarn, you will need to mount the directory into the image.

New project with yarn

docker run -u $(id -u) --rm -v "$PWD":/app trion/ng-cli sh -c "ng config -g cli.packageManager yarn; ng new MyDemoProject"

Note the Angular CLI docker container instance is removed after each execution, therefore the selection of the package manager will just influence the current execution.

Using a shared cache

You can use the regular yarn cache directory or specify a different directory. Make sure that you already have the cache directory initialized before using it with this docker image, otherwise the permissions might end up wrong.

Using the regular yarn directory, which should be the right choice when using during regular development:

docker run -u $(id -u) --rm -v "$HOME/.cache/yarn":/tmp/.cache/yarn -v "$PWD":/app trion/ng-cli sh -c "ng config -g cli.packageManager yarn; ng new MyDemoProject"

Assuming you have a directory "../yarn-cache" with appropriate access rights, you can use it to create a new project using the following command

docker run -u $(id -u) --rm -v "$PWD/../yarn-cache":/tmp/.cache/yarn -v "$PWD":/app trion/ng-cli sh -c "ng config -g cli.packageManager yarn; ng new MyDemoProject"

For subsequent package installations (f.e. in a CI build) just use yarn instead of npm.

Offline mode

This requires the use of a shared cache and a yarn.lock file from a previous yarn package installation run.

cd MyDemoProject
docker run -u $(id -u) --rm -v "$PWD/../../yarn-cache":/tmp/.cache/yarn -v "$PWD":/app trion/ng-cli yarn install --offline
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].