-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
52 lines (42 loc) · 2.35 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
FROM quay.io/genouest/node:16.13-buster
RUN npm install -g @angular/[email protected]
ARG APIURL
ARG SENTRY
ARG UITHEME=cerulean
COPY manager2 /root/genouestaccountmanager/manager2
RUN cd /root/genouestaccountmanager/manager2/src/assets/css && cp ${UITHEME}.min.css theme.css
RUN cd /root/genouestaccountmanager/manager2/src/environments && sed -i 's;apiUrl: "";apiUrl: "'"$SAPIURL"'";' environment.prod.ts
RUN cd /root/genouestaccountmanager/manager2/src/environments && sed -i 's;sentry: "";sentry: "'"$SENTRY"'";' environment.prod.ts
RUN cd /root/genouestaccountmanager/manager2 && npm ci && ng build --base-href /manager2/ --prod --source-map && rm -rf src && rm -rf node_modules && rm -f dist/my-ui/*.gz && npm run compress || true
FROM quay.io/osallou/node:16.13-buster
RUN apt-get update && apt-get install -y ldap-utils vim openssh-client putty-tools
COPY cron/gomngr.sh /opt/gomngr.sh
RUN mkdir -p /root/genouestaccountmanager
WORKDIR /root/genouestaccountmanager
COPY *.json /root/genouestaccountmanager/
RUN npm ci
COPY *.js /root/genouestaccountmanager/
RUN mkdir plugins public routes views tests test manager manager2 config bin
COPY config/test.json /root/genouestaccountmanager/config
COPY plugins /root/genouestaccountmanager/plugins
COPY public /root/genouestaccountmanager/public
COPY routes /root/genouestaccountmanager/routes
COPY core /root/genouestaccountmanager/core
COPY templates /root/genouestaccountmanager/templates
COPY tests /root/genouestaccountmanager/tests
COPY test /root/genouestaccountmanager/test
COPY cron /root/genouestaccountmanager/cron
COPY bin /root/genouestaccountmanager/bin
RUN mkdir -p /opt/my/readmes/readmes1
RUN mkdir -p /opt/my/readmes/readmes2
RUN mkdir -p /opt/my/scripts
RUN mkdir -p /opt/my/plugin-scripts
COPY --from=0 /root/genouestaccountmanager/manager2 /root/genouestaccountmanager/manager2
#COPY manager2 /root/genouestaccountmanager/manager2
#RUN npm install -g @angular/[email protected]
#ARG APIURL
#ARG SENTRY
#RUN cd /root/genouestaccountmanager/manager2/src/environments && sed -i 's;apiUrl: "";apiUrl: "'"$SAPIURL"'";' environment.prod.ts
#RUN cd /root/genouestaccountmanager/manager2/src/environments && sed -i 's;sentry: "";sentry: "'"$SENTRY"'";' environment.prod.ts
#RUN cd /root/genouestaccountmanager/manager2 && npm install && ng build --base-href /manager2/ --prod --source-map && rm -rf src && rm -rf node_modules
ENTRYPOINT node app.js