-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
49 lines (26 loc) · 844 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM registry.centos.org/centos/centos:7
LABEL Codeready dependency analytics
USER 0
RUN mkdir -p /opt/scripts /var/www/html
RUN chown -R 1001:0 /var/www/html
ADD ./fix-permissions.sh ./install.sh ./passwd.template ./run.sh /opt/scripts/
RUN chmod -R 777 /opt/scripts && . /opt/scripts/install.sh
RUN yum install -y epel-release
RUN yum install -y npm nodejs-10
WORKDIR /var/www/html
ADD package.json /var/www/html
ADD package-lock.json /var/www/html
USER 1001
ADD . /var/www/html
# Requires root user to build a production build
USER root
RUN npm install [email protected] --ignore-scripts
RUN npm install
ENV PATH="./var/www/html/node_modules/.bin:$PATH"
# Create A production build
RUN npm run build:prod
# ADD dist /var/www/html
EXPOSE 8080 8443
USER apache
ENTRYPOINT ["/opt/scripts/run.sh"]
CMD ["apache"]