2 # ============LICENSE_START=======================================================
\r
4 # ================================================================================
\r
5 # Copyright (C) 2019 AT&T Intellectual Property. All rights
\r
7 # ================================================================================
\r
8 # Licensed under the Apache License, Version 2.0 (the "License");
\r
9 # you may not use this file except in compliance with the License.
\r
10 # You may obtain a copy of the License at
\r
12 # http://www.apache.org/licenses/LICENSE-2.0
\r
14 # Unless required by applicable law or agreed to in writing, software
\r
15 # distributed under the License is distributed on an "AS IS" BASIS,
\r
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 # See the License for the specific language governing permissions and
\r
18 # limitations under the License.
\r
19 # ============LICENSE_END============================================
\r
20 # ===================================================================
\r
25 FROM node:12.10.0-alpine as build
\r
27 #ENV PATH /app/node_modules/.bin:$PATH
\r
28 COPY onap-clamp-frontend/ /app/
\r
29 RUN npm install --silent
\r
32 FROM nginx:1.17.0-alpine
\r
34 MAINTAINER "The Onap Team"
\r
35 LABEL Description="This image contains Clamp frontend"
\r
39 ENV HTTP_PROXY=$http_proxy
\r
40 ENV HTTPS_PROXY=$https_proxy
\r
41 ENV http_proxy=$HTTP_PROXY
\r
42 ENV https_proxy=$HTTPS_PROXY
\r
44 RUN addgroup onap && adduser -D -G onap clamp
\r
45 RUN mkdir /var/log/onap
\r
46 RUN chmod a+rwx /var/log/onap
\r
48 COPY --from=build /app/build /usr/share/nginx/html
\r
49 COPY --from=build /app/ssl /etc/ssl
\r
50 RUN rm /etc/nginx/conf.d/default.conf
\r
51 RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
\r
53 COPY nginx/nginx.conf /etc/nginx/nginx.conf
\r
54 COPY nginx/default.conf /etc/nginx/conf.d/default.conf
\r
58 RUN chown -R clamp:onap /app && chmod -R 755 /app && \
\r
59 chown -R clamp:onap /var/cache/nginx && \
\r
60 chown -R clamp:onap /var/log/nginx && \
\r
61 chown -R clamp:onap /etc/nginx/conf.d
\r
62 RUN touch /var/run/nginx.pid && \
\r
63 chown -R clamp:onap /var/run/nginx.pid
\r
67 CMD ["nginx", "-g", "daemon off;"]