-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
28 lines (21 loc) · 957 Bytes
/
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
FROM python:3.8-slim
# Install dependencies
RUN apt-get update && apt-get install -y libsasl2-dev curl gcc libldap2-dev libpq-dev \
&& DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} \
&& mkdir -p $DOCKER_CONFIG/cli-plugins \
&& curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose \
&& chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
# Set the working directory and copy the application files
WORKDIR /datahub
COPY . /datahub
# Upgrade pip and install required Python packages
RUN python -m pip install --upgrade pip \
&& pip install python-ldap==3.3.1 \
&& pip install --upgrade pyopenssl \
&& pip install -r requirements.txt
# Set environment variables
ENV PYTHONUNBUFFERED 1
# Expose port 8000 for the Django app
EXPOSE 8000
# Command to run the Django development server
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]