-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublic_gui.Dockerfile
More file actions
66 lines (53 loc) · 1.89 KB
/
public_gui.Dockerfile
File metadata and controls
66 lines (53 loc) · 1.89 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# WISE Requires Ubuntu Focal 20.04 while Builder does not.
FROM ubuntu:focal
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# setup timezone - the timezone where this modeler sits
ENV TZ=America/Edmonton
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Gather Args (Passed ENV vars from the host)
ARG WISE_ENGINE_VERSION="1.0.6-beta.5"
ARG WISE_INTERNAL_JOBS_FOLDER="/usr/src/app/WISE_data/jobs"
ARG WISE_JS_API_LINK="https://github.com/WISE-Developers/WISE_JS_API/releases/download/1.0.6-beta.5/WISE_JS_API-1.0.6-beta.5.zip"
#Install Java and other software into the container
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
htop \
build-essential \
zip \
unzip \
software-properties-common \
dirmngr \
curl \
apt-transport-https \
nano \
iputils-ping \
&& rm -rf /var/lib/apt/lists/*
# Install NPM and NODEJS
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt install -y nodejs
# work around bug in openssl (remove the last line in config)
# allows FETCH to use SSL otherwise secure connections fail
RUN head -n -1 /etc/ssl/openssl.cnf > temp.txt ; mv temp.txt /etc/ssl/openssl.cnf
RUN mkdir -p /usr/src/app/node_modules/wise_js_api
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
WORKDIR /usr/src/app
COPY ./dist/fireModels ./dist/fireModels
COPY ./dist/gui ./dist/gui
COPY ./public ./public
COPY ./src/views ./dist/views
COPY configVars.sh .
#COPY . .
# RUN pwd
# RUN echo "SHowing the jobs/ image..."
# RUN cat ${WISE_INTERNAL_JOBS_FOLDER}/config.json
# Install NodeJS Dependancies
COPY package*.json /usr/src/app/
RUN npm install
WORKDIR /usr/src/app/node_modules/wise_js_api
RUN npm install
WORKDIR /usr/src/app
RUN chmod a+x /usr/src/app/configVars.sh
RUN . ./configVars.sh
# Launch builder to run in the background.
CMD ["npm", "run", "GUI"]