-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 782 Bytes
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
# docker file for Server AND Client
FROM python:3.10.0
WORKDIR /usr/src/app/
# for superuser
RUN apt-get update -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false \
&& apt-get install -y sudo
RUN adduser --disabled-password --gecos '' docker
RUN adduser docker sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER docker
# installing requirements
COPY ./core/ ./core/
COPY docker_config.json ./config.json
COPY ./requirements.txt ./
# for server
COPY ./Server.py ./
# for client
#COPY ./Client_noGUI.py ./
RUN sudo apt-get upgrade -y
RUN sudo apt-get install python-dev -y
RUN sudo pip install --no-cache-dir -r requirements.txt
# execute command
# for server
CMD [ "python", "./Server.py" ]
# for client
#CMD [ "python", "./Client_noGUI.py"]