{"id":14986867,"url":"https://github.com/trion-development/docker-ng-cli","last_synced_at":"2025-04-11T23:06:08.529Z","repository":{"id":16598084,"uuid":"80320975","full_name":"trion-development/docker-ng-cli","owner":"trion-development","description":"Docker image for Angular CLI","archived":false,"fork":false,"pushed_at":"2025-04-09T21:04:10.000Z","size":232,"stargazers_count":70,"open_issues_count":0,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T23:05:30.730Z","etag":null,"topics":["angular-cli","docker-image"],"latest_commit_sha":null,"homepage":"https://www.trion.de/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trion-development.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-29T00:41:42.000Z","updated_at":"2025-04-09T21:04:14.000Z","dependencies_parsed_at":"2023-10-05T14:45:36.141Z","dependency_job_id":"0c48f0cf-0d12-4f07-89ab-9f6b9a07c6c1","html_url":"https://github.com/trion-development/docker-ng-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trion-development%2Fdocker-ng-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trion-development%2Fdocker-ng-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trion-development%2Fdocker-ng-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trion-development%2Fdocker-ng-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trion-development","download_url":"https://codeload.github.com/trion-development/docker-ng-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492871,"owners_count":21113163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular-cli","docker-image"],"created_at":"2024-09-24T14:13:42.893Z","updated_at":"2025-04-11T23:06:08.488Z","avatar_url":"https://github.com/trion-development.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker ng-cli (Angular CLI Container Image)\n\nDocker image for Angular CLI to use as build container.\n\nImage on DockerHub: https://hub.docker.com/r/trion/ng-cli/\n\nCurrently this image uses Node LTS (18, npm 8) and node:lts-slim as base distribution.\n\nThe AngularCLI analytics feature is disabled by default to avoid problems in CI environments.\nIf you want to opt-in, set the `NG_CLI_ANALYTICS` environment variable to an empty value.\n\nMore information, commercial support and training is available at https://www.trion.de/\n\n## Example usage\n```\ndocker run -u $(id -u) --rm -v \"$PWD\":/app trion/ng-cli ng new MyDemo\ncd MyDemo\ndocker run -u $(id -u) --rm -v \"$PWD\":/app trion/ng-cli ng build\n```\n\nTo run the Angular CLI development server from docker you need to map the port and instruct Angular CLI to listen on all interfaces.\nFor example use\n```\ncd MyDemo\ndocker run -u $(id -u) --rm -p 4200:4200 -v \"$PWD\":/app trion/ng-cli ng serve --host 0.0.0.0\ndocker run -u $(id -u) --rm -p 4200:4200 -v \"$PWD\":/app trion/ng-cli ng serve --host=:: # ipv6\n```\n\nIf 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.\n\n```\ndocker run -u $(id -u) --rm -p 4200:4200 -v /etc/passwd:/etc/passwd -v \"$PWD\":/app trion/ng-cli npm install\n```\n\n\n## Usage in a CI environment\nTo 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.\n\n\nDocker images for Angular karma unit tests and end to end tests with webdriver/selenium:\n* https://github.com/trion-development/docker-ng-cli-karma\n* https://github.com/trion-development/docker-ng-cli-e2e\n\n## using yarn\nThis image contains yarn preinstalled and can be used as alternative package manager.\nIf you want to use a shared cache directory for yarn, you will need to mount the directory into the image.\n\n### New project with yarn\n```\ndocker run -u $(id -u) --rm -v \"$PWD\":/app trion/ng-cli sh -c \"ng config -g cli.packageManager yarn; ng new MyDemoProject\"\n```\n\nNote the Angular CLI docker container instance is removed after each execution, therefore the selection of the package manager will just influence the current execution.\n\n### Using a shared cache\n\nYou can use the regular yarn cache directory or specify a different directory.\nMake sure that you already have the cache directory initialized before using it with this docker image, otherwise the permissions might end up wrong.\n\nUsing the regular yarn directory, which should be the right choice when using during regular development:\n```\ndocker 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\"\n```\n\nAssuming you have a directory \"../yarn-cache\" with appropriate access rights, you can use it to create a new project using the following command\n\n```\ndocker 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\"\n```\n\nFor subsequent package installations (f.e. in a CI build) just use `yarn` instead of `npm`.\n\n### Offline mode\nThis requires the use of a shared cache and a `yarn.lock` file from a previous yarn package installation run.\n\n```\ncd MyDemoProject\ndocker run -u $(id -u) --rm -v \"$PWD/../../yarn-cache\":/tmp/.cache/yarn -v \"$PWD\":/app trion/ng-cli yarn install --offline\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrion-development%2Fdocker-ng-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrion-development%2Fdocker-ng-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrion-development%2Fdocker-ng-cli/lists"}