forked from allthingslinux/tux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (32 loc) · 1 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
FROM python:3.12-slim
WORKDIR /app
# Install dependencies for cairo and other utilities
RUN apt-get update && \
apt-get install -y \
build-essential \
curl \
libcairo2 \
libffi-dev \
libgdk-pixbuf2.0-0 \
libpango1.0-0 \
libpangocairo-1.0-0 \
shared-mime-info && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Rust and Cargo
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install tealdeer and update tldr cache
RUN cargo install tealdeer
RUN tldr -u
# Copy Poetry files and install dependencies
COPY pyproject.toml poetry.lock /app/
RUN pip install poetry && \
poetry config virtualenvs.create false && \
poetry install --no-interaction --no-ansi
# Copy the remaining project files
COPY . /app
RUN mkdir -p /app/.cache/prisma && chmod +x /app/.cache/prisma
# Set PYTHONPATH environment variable to /app
ENV PYTHONPATH=/app
CMD ["sh", "-c", "ls && poetry run prisma py fetch && poetry run prisma generate && poetry run python tux/main.py"]