-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_app
30 lines (24 loc) · 883 Bytes
/
Dockerfile_app
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
FROM ubuntu:22.04
# Installing packages
RUN apt-get update && apt-get install -y \
openssh-server=1:8.9p1-3ubuntu0.6 \
git=1:2.34.1-1ubuntu1.10 \
python3=3.10.6-1~22.04 \
python3-pip=22.0.2+dfsg-1ubuntu0.4
# Allowing to ssh as root and setting public key
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
COPY ssh-keys/id_rsa.pub /root/.ssh/authorized_keys
# Cloning project with web application
RUN git clone https://github.com/moevm/devops-examples.git
WORKDIR devops-examples/EXAMPLE_APP
# Fixing host parameter in main.py file
COPY app_run_host.patch ./
RUN patch main.py app_run_host.patch
# Installing dependencies
RUN pip3 install \
flask==3.0.3 \
lti==0.9.5 \
flask_login==0.6.3 \
celery==5.3.6
# Starting ssh and web application
ENTRYPOINT ["bash", "-c", "service ssh start && python3 main.py"]