/
Dockerfile
45 lines (37 loc) · 1.08 KB
/
Dockerfile
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
# This Dockerfile is used to build the Rubintv on a commit basis.
# The GH action will build the image and push it to the registry.
# The image will be used to deploy the application on dev servers.
# Note:
# I was not able to use the conda recipe to build the image,
# faced several issues which at the end I was not able to resolve
# and decided to use the python image instead.
# This is a temporary solution, and I will work on a better approach
# to build the image using conda.
# TODO: DM-43222.
FROM python:3.11.1-slim-bullseye
USER root
# Install required packages
RUN apt-get update && \
apt-get install -y \
libsasl2-dev \
python-dev \
libldap2-dev \
git \
inetutils-ping \
vim \
nano \
curl \
procps \
findutils \
libssl-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/rubintv/
COPY . .
# Install dependencies
RUN pip install -r requirements.txt && \
python setup.py install
# Adjust permissions for executable
RUN chmod +x /usr/src/rubintv/start-daemon.sh
# Expose the port.
EXPOSE 8000
CMD ["/usr/src/rubintv/start-daemon.sh"]