forked from samherrmann/docker-angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 783 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:10-alpine
# Change ownership of the global node modules directory
# to allow installs without requiring sudo privileges.
#
# See: https://docs.npmjs.com/getting-started/fixing-npm-permissions
RUN chown -R node $(npm config get prefix)
# Install:
# Chromium - For running unit tests
# Git - Used by the CLI when creating new projects
# Bash - Needed by webdriver-manager
ARG CHROMIUM_VERSION
USER root
RUN apk add --no-cache \
bash \
chromium=$CHROMIUM_VERSION \
chromium-chromedriver=$CHROMIUM_VERSION \
git
COPY .gitconfig /home/node
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium
# Install Angular CLI
ARG NG_CLI_VERSION
USER node
RUN npm install -g @angular/cli@$NG_CLI_VERSION
WORKDIR /code
ENTRYPOINT ["npm"]