-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwise_ubuntu_2004.Dockerfile
More file actions
95 lines (73 loc) · 3.1 KB
/
wise_ubuntu_2004.Dockerfile
File metadata and controls
95 lines (73 loc) · 3.1 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# PSaaS Requires Ubuntu Focal while Builder does not.
FROM ubuntu:focal-20230126
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# setup timezone - the timezone where this modeler sits
ARG DEMO_TIMEZONE
ENV TZ $DEMO_TIMEZONE
ARG HOST_JOBS_FOLDER
ENV HOST_JOBS_FOLDER $HOST_JOBS_FOLDER
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Gather Args (Passed ENV vars from the host)
# install missing utilities
# RUN apt-get update && apt-get install -y gnupg
# sort out some keys
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
#Install Java and other software into the container
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
openjdk-16-jre \
htop \
build-essential \
zip \
unzip \
software-properties-common \
dirmngr \
curl \
apt-transport-https \
nano \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install NPM and NODEJS
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt install -y nodejs
#install WISE 1.0 beta
RUN mkdir -p /tmp/WISE/
RUN mkdir -p /tmp/builder/
# trick to get the latest wise-ubuntu2004 deb
RUN DA_LATEST_APP=$(curl -s https://api.github.com/repos/WISE-Developers/WISE_Application/releases/latest | grep browser_download_url | grep ubuntu2004 | cut -d : -f 2,3 | tr -d '"') ; wget $DA_LATEST_APP -O /tmp/WISE/wise-ubuntu2004.deb
# trick to get the latest builder
RUN DA_LATEST_BUILDER=$(curl -s https://api.github.com/repos/WISE-Developers/WISE_Builder_Component/releases/latest | grep browser_download_url | cut -d : -f 2,3 | tr -d '"') ; wget $DA_LATEST_BUILDER -O /tmp/builder/latest_builder.zip
RUN unzip /tmp/builder/latest_builder.zip -d /tmp/builder/
RUN set -eux; \
unzip -o /tmp/builder/latest_builder.zip -d /tmp/builder/; \
ls -lha /tmp/builder; \
cp /tmp/builder/WISE_Builder.jar /usr/bin; \
cp -r /tmp/builder/WISE_Builder_lib /usr/bin/WISE_Builder_lib;
RUN ls -lha /tmp/WISE/
RUN apt install -y /tmp/WISE/wise-ubuntu2004.deb
RUN rm -rf /tmp/builder;
RUN rm -rf /tmp/WISE;
WORKDIR /usr/src/app
# 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
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# Install NodeJS Dependancies
RUN npm install
# set job directory for this PSAAS container
RUN npm config set psaas-js-api:job_directory=/usr/src/app/wisedemo/$HOST_JOBS_FOLDER
RUN echo "Copying files.... to /usr/src/app/wisedemo/$HOST_JOBS_FOLDER"
# Bundle app source
COPY . .
COPY config.sample.json /usr/src/app/wisedemo/$HOST_JOBS_FOLDER/config.json
COPY defaults.sample.json /usr/src/app/wisedemo/$HOST_JOBS_FOLDER/defaults.json
# Configure the terminal
COPY aliasshell.sh /bin/aliasshell.sh
COPY install.bashrc /root/.bashrc
SHELL ["/bin/aliasshell.sh"]
# This script will modify the WISE/PSAAS config.json with ENV Vars.
# CMD [ "node","copyvars.js" ]
# Launch builder and GUI to run in the background.
CMD ["npm", "run", "test-wise"]