-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (45 loc) · 1.69 KB
/
Copy pathDockerfile
File metadata and controls
66 lines (45 loc) · 1.69 KB
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
# Use an official Python runtime as a parent image
FROM python:3.9
ENV PYTHONUNBUFFERED=1
# Set the working directory to /app
WORKDIR /app
#RUN python data/mongoDB/generatSetupMongo.py
# Run a Python script to modify the docker-compose.yml as well as other configs
#virtul env
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Copy the requirements file
COPY requirements.txt /app/requirements.txt
RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get install -y \
libsdl2-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
libpostproc-dev
# Upgrade pip and install required python packages
RUN pip install --upgrade pip
RUN pip install sip
RUN pip install --trusted-host pypi.python.org -r requirements.txt
RUN apt install vim -y
# Install dependencies
# Set environment variables for Qt
#ENV QT_X11_NO_MITSHM=1
# Copy the current directory contents into the container at /app
#COPY . /app
#bind in read only mode :)
#docker run -v ./data/mongoDB/setup.js:/docker-entrypoint-initdb.d/init-mongo.js:ro mongo-init
#lets see if this fixes my issue with the conf not bein there :)
#COPY docker-compose.yml .
# Set the PYTHONPATH environment variable
#ENV PYTHONPATH="$PYTHONPATH:/app:/app/src/"
ENV PYTHONPATH="$PYTHONPATH:/app:/app/src"
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Run appDemoAsync.py when the container launches
CMD ["python","-u", "src/server/main.py"]
# (could a way to create unit config.yml CMD ["sh", "-c", "if [ \"$RUN_TESTS\" = \"true\" ]; then python -m unittest discover; else python appDemoAsync.py; fi"]