-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·54 lines (42 loc) · 1.12 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM node:latest
# ARGS
ARG PROJECT_NAME=expo_web
# get default node user : 'node'
ARG USER=node
ARG WORKSPACE=/usr/dockers/expo
# update system
RUN apt-get update
RUN apt-get install rsync
# allow npm to install as root user
#other solution : RUN npm -g install nodegit --unsafe-perm
RUN npm -g config set user root
#install project dependencies
RUN npm install -g @angular/cli@^7.0.3
RUN npm install -g node-sass
RUN apt-get install git
RUN npm -v
RUN ng -v
RUN npm install node-sass
WORKDIR $WORKSPACE
# copy the check script : do what you want. see below for the call
COPY ./Docker/check-project.sh ./Docker/check-project.sh
##
# Since we are not creating any user here, you need to add the default docker's user
# to your computer by updatinf both following files:
# nano /etc/subuid
# nano /etc/subgid
# https://blog.ippon.tech/docker-and-permission-management/
#
# Exemple of content :
# currentUser:1000:65536
#
# add node user
# node:1000:65536
##
RUN chown -R $USER:$USER $WORKSPACE
USER $USER
RUN npm -g config set user $USER
RUN ls -la
COPY ./package*.json ./
RUN bash Docker/check-project.sh $PROJECT_NAME
EXPOSE 4200