-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile.application-dev
80 lines (67 loc) · 2.81 KB
/
Dockerfile.application-dev
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
# docker build -t webis/tira-application:basis-0.0.97 -f Dockerfile.application-dev .
FROM ubuntu:22.04
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y python3 python3-pip python-is-python3 mysql-client nginx sudo podman git \
&& apt-get install -y gcc default-libmysqlclient-dev pkg-config \
&& rm -Rf /var/cache/apt \
&& rm -Rf /root/.cache/pip \
&& echo '%podman ALL=(ALL) ALL' > /etc/sudoers.d/podman
ADD requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt \
&& rm -Rf /var/cache/apt \
&& rm -Rf /root/.cache/pip
RUN pip3 uninstall -y diffir \
&& pip3 install git+https://github.com/mam10eks/diffir && \
addgroup --gid 1010 tira && \
adduser --disabled-password --uid 1010 --ingroup tira tira && \
adduser tira root && \
mkdir /tira-tmp-debug && \
mkdir -p /tira/application/src/tira && \
mkdir -p /etc/nginx/logs && \
mkdir -p /mnt/ceph/tira && \
mkdir -p /root/.ir_datasets \
&& rm -Rf /var/cache/apt \
&& rm -Rf /root/.cache/pip \
&& apt-get install -y fuse-overlayfs
COPY src/tira_nginx.conf /etc/nginx/nginx.conf
RUN chown -R tira:tira /usr/local && \
chmod 777 /var/run/ && \
echo "tira ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers &&\
touch /var/log/tira_debug.txt &&\
touch /tira/application/src/debug.log &&\
chown tira:tira /var/log/tira_debug.txt &&\
chown tira:tira /tira/application/src/debug.log &&\
chown -R tira:tira /root/.ir_datasets &&\
chmod 777 /root/.ir_datasets &&\
chmod 777 /root &&\
mkdir -p /home/tira/.tira &&\
mkdir -p /mnt/ceph/tira/log/tira-application &&\
mkdir /home/tira/.ssh &&\
mkdir /mnt/ceph/tira/state &&\
mkdir -p /usr/share/nginx/logs/ && \
chmod 777 /usr/share/nginx/logs/ && \
touch /mnt/ceph/tira/state/tira_vm_states.sqlite3 &&\
chown tira:tira -R /home/tira &&\
chown tira:tira -R /tira
RUN pip3 install tira==0.0.97 ir-measures==0.3.1
RUN apt-get install -y wget curl
RUN wget 'https://nodejs.org/dist/v20.10.0/node-v20.10.0-linux-x64.tar.xz' \
&& tar -xf node-v20.10.0-linux-x64.tar.xz \
&& rm node-v20.10.0-linux-x64.tar.xz \
&& mv node-v20.10.0-linux-x64/bin/* /usr/local/bin/ \
&& mv node-v20.10.0-linux-x64/lib/node_modules/ /usr/local/lib/ \
&& npm install --global yarn
ADD frontend/package.json frontend/yarn.lock frontend/vite.config.ts frontend/jest.config.js frontend/babel.config.js /tmp-del/
RUN cd /tmp-del \
&& yarn create vuetify \
&& yarn install \
&& yarn install --dev \
&& mv node_modules/* /usr/local/lib/node_modules \
&& mv node_modules/.bin /usr/local/lib/node_modules/.bin \
&& mv node_modules/.yarn-integrity /usr/local/lib/node_modules/.yarn-integrity \
&& cd / \
&& rm -R /tmp-del/ \
&& apt-get install -y vim htop bash-completion \
&& echo "\n. /usr/share/bash-completion/bash_completion" >> ~/.bashrc
ENV PATH=${PATH}:./usr/local/lib/node_modules/.bin