mikmc commited on
Commit
8a13ced
·
verified ·
1 Parent(s): 3fd5548

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -11
Dockerfile CHANGED
@@ -1,28 +1,40 @@
1
- FROM python:3.11-alpine
 
2
  LABEL name="Comet" \
3
  description="Stremio's fastest torrent/debrid search add-on." \
4
- url="https://github.com/g0ldyy/comet"
5
 
6
- WORKDIR /app
7
 
8
- ARG DATABASE_PATH
9
 
 
10
  ENV PYTHONUNBUFFERED=1 \
11
  PYTHONDONTWRITEBYTECODE=1 \
12
  POETRY_NO_INTERACTION=1 \
13
  POETRY_HOME="/usr/local" \
14
  FORCE_COLOR=1 \
15
- TERM=xterm-256color
16
 
17
- # Fix python-alpine gcc
18
  RUN apk add --no-cache \
19
  gcc \
20
  musl-dev \
21
  libffi-dev \
22
- make
 
 
 
 
 
 
 
 
 
 
23
 
24
- RUN pip install poetry
25
- COPY . .
26
- RUN poetry install --no-cache --no-root --without dev
27
 
28
- ENTRYPOINT ["poetry", "run", "python", "-m", "comet.main"]
 
 
1
+ FROM python:3.11-alpine
2
+
3
  LABEL name="Comet" \
4
  description="Stremio's fastest torrent/debrid search add-on." \
5
+ url="https://github.com/g0ldyy/comet"
6
 
7
+ WORKDIR /app
8
 
9
+ ARG DATABASE_PATH
10
 
11
+ # Environment variables for Python and Poetry
12
  ENV PYTHONUNBUFFERED=1 \
13
  PYTHONDONTWRITEBYTECODE=1 \
14
  POETRY_NO_INTERACTION=1 \
15
  POETRY_HOME="/usr/local" \
16
  FORCE_COLOR=1 \
17
+ TERM=xterm-256color
18
 
19
+ # Install necessary build dependencies
20
  RUN apk add --no-cache \
21
  gcc \
22
  musl-dev \
23
  libffi-dev \
24
+ make \
25
+ python3-dev # Added to help with building some dependencies
26
+
27
+ # Install Poetry
28
+ RUN pip install poetry
29
+
30
+ # Copy only the Poetry files first for dependency installation
31
+ COPY pyproject.toml poetry.lock ./
32
+
33
+ # Install dependencies using Poetry
34
+ RUN poetry install --no-cache --without dev
35
 
36
+ # Now copy the rest of the application code
37
+ COPY . .
 
38
 
39
+ # Entrypoint to run the application
40
+ ENTRYPOINT ["poetry", "run", "python", "-m", "comet.main"]