-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.setup
More file actions
39 lines (29 loc) · 1.14 KB
/
Dockerfile.setup
File metadata and controls
39 lines (29 loc) · 1.14 KB
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
# Dockerfile for Thoth setup wizard (config only — no Docker-in-Docker)
# --- Stage 1: Build the Obsidian plugin so users don't need Node/npm ---
FROM node:20-slim AS plugin-builder
WORKDIR /plugin
COPY obsidian-plugin/thoth-obsidian/ ./
RUN npm ci --ignore-scripts && npm run build
# --- Stage 2: Setup wizard image ---
FROM python:3.12-slim
WORKDIR /app
# Install minimal system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy setup-related code, templates, and data
COPY pyproject.toml README.md ./
COPY src/ ./src/
COPY templates/ ./templates/
COPY data/ ./data/
# Copy pre-built plugin artifacts from the Node build stage
COPY --from=plugin-builder /plugin/dist/ ./obsidian-plugin/thoth-obsidian/dist/
COPY obsidian-plugin/thoth-obsidian/manifest.json ./obsidian-plugin/thoth-obsidian/manifest.json
COPY obsidian-plugin/thoth-obsidian/styles.css ./obsidian-plugin/thoth-obsidian/styles.css
# Install Thoth with setup dependencies only
RUN pip install --no-cache-dir -e ".[setup]"
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["python", "-m", "thoth"]
CMD ["setup"]