-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
36 lines (28 loc) · 920 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
28
29
30
31
32
33
34
35
36
# Use an official Python runtime as the base image
FROM python:3.10.4-buster
# Set the working directory in the container
WORKDIR /opt/project
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH .
ENV COOKING_CORE_SETTING_IN_DOCKER true
# Install dependencies
RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& pip install virtualenvwrapper poetry==1.4.2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY ["poetry.lock", "pyproject.toml", "./"]
RUN poetry install --no-root
# Copy project files
COPY ["README.md", "Makefile", "./"]
COPY cooking_core cooking_core
COPY local local
# Expose the Django development server port (adjust if needed)
EXPOSE 8000
# Set up the entrypoint
COPY scripts/entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]