-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
104 lines (91 loc) · 2.38 KB
/
Dockerfile
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
95
96
97
98
99
100
101
102
103
104
# This image docker serve the camisole binary with frontend application (nodejs) for the ip7 team
# https://camisole.prologin.org/installation.html
# Docker Hub https://hub.docker.com/r/archlinux/base/
FROM archlinux/base
LABEL maintainer "[email protected]"
LABEL version "1.0"
LABEL owner "ip7"
SHELL [ "/bin/bash", "-eux", "-o", "pipefail", "-c" ]
# Update cache
# Install common deps
RUN \
pacman -Syu --noconfirm \
&& pacman -S --noconfirm \
sudo \
base-devel \
git \
wget \
yajl \
python3 \
python-aiohttp \
python-msgpack \
python-yaml \
nodejs \
npm \
jdk8-openjdk \
jre8-openjdk \
sqlite3
# Create ip7 user
RUN \
useradd -m --home-dir /home/ip7 --shell=/bin/false ip7 \
&& usermod --home /home/ip7 -L ip7 \
&& echo "ip7 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER ip7
WORKDIR /home/ip7
# Install yaourt
# From here https://www.ostechnix.com/install-yaourt-arch-linux/
RUN \
git clone https://aur.archlinux.org/package-query.git \
&& cd package-query/ \
&& makepkg -si --noconfirm \
&& cd .. \
&& git clone https://aur.archlinux.org/yaourt.git \
&& cd yaourt \
&& makepkg -si --noconfirm \
&& cd .. \
&& rm -dR yaourt/ package-query/
# Install camisole deps
RUN \
yaourt -S --noconfirm \
camisole-git \
jdk11-openjdk ocaml \
isolate-git
# Install camisole
RUN \
git clone https://github.com/prologin/camisole \
&& cd camisole \
&& python3 setup.py build \
&& sudo python3 setup.py install \
&& cd .. \
&& sudo rm -rf camisole
# Install deps
COPY package.json .
RUN npm install
RUN npm i request --save
# add subjects and website
COPY static static
COPY views views
COPY subjects subjects
COPY \
index.js \
add_users.js \
insert_user.js \
update_data.js \
launch.sh \
database.sql \
./
RUN \
sudo chown -R ip7 \
views \
static \
subjects \
index.js \
add_users.js \
insert_user.js \
update_data.js \
launch.sh \
database.sql
VOLUME [ "/home/ip7/save" ]
SHELL [ "/bin/sh", "-c" ]
ENTRYPOINT ["sudo", "/bin/sh", "launch.sh"]