sebdet | c95e8df | 2019-06-25 11:06:06 +0200 | [diff] [blame] | 1 | ###
|
| 2 | # ============LICENSE_START=======================================================
|
| 3 | # ONAP CLAMP
|
| 4 | # ================================================================================
|
| 5 | # Copyright (C) 2019 AT&T Intellectual Property. All rights
|
| 6 | # reserved.
|
| 7 | # ================================================================================
|
| 8 | # Licensed under the Apache License, Version 2.0 (the "License");
|
| 9 | # you may not use this file except in compliance with the License.
|
| 10 | # You may obtain a copy of the License at
|
| 11 | #
|
| 12 | # http://www.apache.org/licenses/LICENSE-2.0
|
| 13 | #
|
| 14 | # Unless required by applicable law or agreed to in writing, software
|
| 15 | # distributed under the License is distributed on an "AS IS" BASIS,
|
| 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 17 | # See the License for the specific language governing permissions and
|
| 18 | # limitations under the License.
|
| 19 | # ============LICENSE_END============================================
|
| 20 | # ===================================================================
|
| 21 | #
|
| 22 | ###
|
| 23 |
|
| 24 | # build environment
|
sebdet | 101193d | 2019-09-05 18:25:59 +0200 | [diff] [blame] | 25 | FROM node:12.10.0-alpine as build
|
sebdet | c95e8df | 2019-06-25 11:06:06 +0200 | [diff] [blame] | 26 | WORKDIR /app
|
| 27 | #ENV PATH /app/node_modules/.bin:$PATH
|
| 28 | COPY onap-clamp-frontend/ /app/
|
| 29 | RUN npm install --silent
|
| 30 | RUN npm run build
|
| 31 |
|
| 32 | FROM nginx:1.17.0-alpine
|
| 33 |
|
| 34 | MAINTAINER "The Onap Team"
|
| 35 | LABEL Description="This image contains Clamp frontend"
|
| 36 |
|
| 37 | ARG http_proxy
|
| 38 | ARG https_proxy
|
| 39 | ENV HTTP_PROXY=$http_proxy
|
| 40 | ENV HTTPS_PROXY=$https_proxy
|
| 41 | ENV http_proxy=$HTTP_PROXY
|
| 42 | ENV https_proxy=$HTTPS_PROXY
|
| 43 |
|
| 44 | RUN addgroup onap && adduser -D -G onap clamp
|
| 45 | RUN mkdir /var/log/onap
|
| 46 | RUN chmod a+rwx /var/log/onap
|
| 47 |
|
| 48 | COPY --from=build /app/build /usr/share/nginx/html
|
sebdet | 1e86592 | 2019-08-27 17:56:04 -0700 | [diff] [blame] | 49 | COPY --from=build /app/ssl /etc/ssl
|
sebdet | c95e8df | 2019-06-25 11:06:06 +0200 | [diff] [blame] | 50 | RUN rm /etc/nginx/conf.d/default.conf
|
sebdet | 101193d | 2019-09-05 18:25:59 +0200 | [diff] [blame] | 51 | RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
|
sebdet | 1e86592 | 2019-08-27 17:56:04 -0700 | [diff] [blame] | 52 | COPY nginx/nginx.conf /etc/nginx/conf.d
|
| 53 | EXPOSE 443
|
sebdet | c95e8df | 2019-06-25 11:06:06 +0200 | [diff] [blame] | 54 | CMD ["nginx", "-g", "daemon off;"] |