File size: 673 Bytes
6fb61f9
 
a5a4df3
 
 
 
c5983d3
cbac855
2d4c9c2
a5a4df3
 
 
6fb61f9
a5a4df3
6fb61f9
a5a4df3
49e2ad8
a5a4df3
7296192
 
a5a4df3
2d4c9c2
174e6c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu

RUN apt-get update && \
    apt-get install -y sudo && \
    apt-get clean
RUN apt-get install -y wget unzip && apt-get update && apt-get install -y python3 python3-pip python3.12-venv

ARG DRIVE_CODE

RUN useradd -ms /bin/bash appuser
RUN usermod -aG sudo appuser
RUN echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

USER appuser

WORKDIR /app
RUN wget -O code.zip "https://drive.google.com/uc?export=download&id=$DRIVE_CODE"
RUN sudo chmod -R 777 /app
RUN mv code.zip code_path.zip
RUN unzip code_path.zip -d .
RUN python3 -m venv venv
RUN /bin/bash -c "source venv/bin/activate && pip3 install -r requirements.txt"
CMD [ "venv/bin/python","server.py"]