-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
42 lines (33 loc) · 1.01 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.11-slim
# Install build tools and required libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:${PATH}"
# Set terminal environment variables
ENV TERM=xterm-256color
ENV COLORTERM=truecolor
# Set up working directory
WORKDIR /app
COPY pyproject.toml ./
COPY drawio2clab.py ./
COPY clab2drawio.py ./
COPY entrypoint.sh ./
COPY styles/ ./styles/
COPY core/ ./core/
COPY cli/ ./cli/
# Install dependencies using uv
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=cache,target=/root/.cache/uv \
uv pip install --system -r pyproject.toml
# Make the entrypoint script executable
RUN chmod +x /app/entrypoint.sh
# Set the working directory for running the application
WORKDIR /data
ENV APP_BASE_DIR=/app
# Use the entrypoint script to handle script execution
ENTRYPOINT ["/app/entrypoint.sh"]