File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM node:9.2 .0-alpine
1+ FROM node:14.18 .0-alpine
22
3- LABEL authors="Alejandro Such <alejandro.such@gmail.com> , Mihai Bob <mihai.m.bob@gmail.com>"
3+ LABEL authors="Alejandro Such <alejandro.such@gmail.com> , Mihai Bob <mihai.m.bob@gmail.com>, Dinei A. Rockenbach <dineiar@gmail.com> "
44
55RUN apk update \
6- && apk add --update alpine-sdk python \
7- && yarn global add @angular/cli@1.5.5 \
8- && ng set --global packageManager= yarn \
9- && apk del alpine-sdk python \
6+ && apk add --update alpine-sdk python3 \
7+ && yarn global add @angular/cli@10.2.3 \
8+ && ng config --global cli. packageManager yarn \
9+ && apk del alpine-sdk python3 \
1010 && rm -rf /tmp/* /var/cache/apk/* *.tar.gz ~/.npm \
1111 && npm cache clean --force \
1212 && yarn cache clean \
1313 && sed -i -e "s/bin\/ ash/bin\/ sh/" /etc/passwd
14+
15+ EXPOSE 4200
16+
17+ # Replaces default node entrypoint to allow/force "ng" command by default
18+ COPY docker-entrypoint.sh /usr/local/bin/
19+
20+ CMD [ "ng" ]
Original file line number Diff line number Diff line change 77 |___/
88```
99
10- ** @angular/cli :** 1.5.5 <br />
11- ** node:** 6.11.2 <br />
12- ** npm:** 3.10.10 <br />
13- ** yarn:** 0.24.6 <br />
10+ ** @angular/cli :** 10.2.3 <br />
11+ ** node:** 14.18.0 <br />
12+ ** npm:** 6.14.15 <br />
13+ ** yarn:** 1.22.5 <br />
1414** os:** linux x64<br />
1515** package manager:** yarn<br />
1616** docker hub:** https://hub.docker.com/r/alexsuch/angular-cli/
@@ -24,19 +24,19 @@ This image has the same usage as Angular CLI (https://cli.angular.io/)
2424### Creating a project
2525
2626```
27- docker run -it --rm -w /app -v $(pwd):/app alexsuch/angular-cli:1.5.5 ng new my-project-name
27+ docker run -it --rm -w /app -v $(pwd):/app alexsuch/angular-cli:10.2.3 ng new my-project-name
2828```
2929
3030### Generating a component
3131
3232```
33- docker run -it --rm -w /app -v $(pwd)/my-project-name:/app alexsuch/angular-cli:1.5.5 ng g component sample-component
33+ docker run -it --rm -w /app -v $(pwd)/my-project-name:/app alexsuch/angular-cli:10.2.3 ng g component sample-component
3434```
3535
3636### Serving
3737
3838```
39- docker run -it --rm -w /app -v $(pwd)/my-project-name:/app -p 4200:4200 alexsuch/angular-cli:1.5.5 ng serve --host 0.0.0.0
39+ docker run -it --rm -w /app -v $(pwd)/my-project-name:/app -p 4200:4200 alexsuch/angular-cli:10.2.3 ng serve --host 0.0.0.0
4040```
4141
4242## Credits
@@ -49,6 +49,7 @@ This Docker image has been made with ❤️ by [Alejandro Such ](https://twitter
4949 - [ Daniel Schreiber] ( https://github.com/daniel-sc )
5050 - [ nlko] ( https://github.com/nlko )
5151 - [ Michaël van de Giessen] ( https://github.com/tubbynl )
52+ - [ Dinei A. Rockenbach] ( https://github.com/dineiar )
5253
5354## License
5455
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ if [ " ${1# -} " != " ${1} " ] || [ -z " $( command -v " ${1} " ) " ]; then
5+ set -- ng " $@ "
6+ fi
7+
8+ exec " $@ "
You can’t perform that action at this time.
0 commit comments