blob: ea867adc19a19b3e65c589b89eec592a23e5294d [file] [log] [blame]
BjornMagnussonXA80a92002020-03-19 14:31:06 +01001# ============LICENSE_START===============================================
2# Copyright (C) 2020 Nordix Foundation. All rights reserved.
3# ========================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15# ============LICENSE_END=================================================
16#
17
BjornMagnussonXA72667f12020-04-24 09:20:18 +020018#Dockerfile to create an image with both python3.8 and nodejs 14
19FROM python:3.8
BjornMagnussonXA80a92002020-03-19 14:31:06 +010020
21WORKDIR /usr/src/app
22
BjornMagnussonXA72667f12020-04-24 09:20:18 +020023#Install python modules
BjornMagnussonXA80a92002020-03-19 14:31:06 +010024COPY requirements.txt requirements.txt
BjornMagnussonXA80a92002020-03-19 14:31:06 +010025RUN pip install -r requirements.txt
26
BjornMagnussonXA72667f12020-04-24 09:20:18 +020027#Install nodejs and packages
28RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
29RUN apt-get install -y nodejs
30COPY package.json package.json
31RUN npm install express
32RUN npm install express-http-proxy
BjornMagnussonXA80a92002020-03-19 14:31:06 +010033
BjornMagnussonXA72667f12020-04-24 09:20:18 +020034#Copy apps and start script
35COPY mr.py mr.py
36COPY frontend.js frontend.js
37COPY start.sh start.sh
38
39RUN chmod +x ./start.sh
40
41CMD ["./start.sh"]