blob: b781ec05392a29001ac9c482f4003af5fb7eba3f [file] [log] [blame]
garciadeblas9887bb42020-06-08 09:55:28 +00001# Copyright 2020 ETSI
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16FROM ubuntu:18.04
17
18RUN apt-get update && apt-get install -y curl xz-utils gnupg2 \
19 && apt-get update && apt-get install -y apt-transport-https software-properties-common \
20 && curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
21 && echo "deb https://deb.nodesource.com/node_10.x xenial main" | tee -a /etc/apt/sources.list.d/nodesource.list \
22 && echo "deb-src https://deb.nodesource.com/node_10.x xenial main" | tee -a /etc/apt/sources.list.d/nodesource.list \
23 && apt-get update && apt-get install -y nodejs \
24 && apt-get install -y nginx
25
26ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
27ARG RELEASE=ReleaseSEVEN-daily
28ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
29ARG REPOSITORY=testing
30ARG NGUI_VERSION
31
32RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
33RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} NG-UI" && apt-get update
34
35RUN apt-get install -y osm-ngui${NGUI_VERSION} && \
36 rm -rf /var/lib/apt/lists/*
37
38WORKDIR /usr/share/osm-ngui
39RUN npm install
40# Building app.
41RUN npm run build
42RUN cp /usr/share/osm-ngui/nginx.conf /etc/nginx/sites-available/default
43#RUN cp /usr/share/osm-ngui/supervisor-app.conf /etc/supervisor/conf.d/
44
45EXPOSE 80
46
47HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \
48 CMD curl --silent --fail localhost:80 || exit 1
49
50# Starting server.
51CMD ["nginx", "-g", "daemon off;"]
52