diff options
| author | uvok | 2026-06-16 10:30:41 +0200 |
|---|---|---|
| committer | uvok | 2026-06-16 10:30:41 +0200 |
| commit | 51c26daa0aceada4b1bff03bb2d0aefa586f4078 (patch) | |
| tree | ffb279e847350b993a6ab295dcce809b26011aaf /Containerfile | |
| parent | 162c6e4b14f2ed52beb80b103cae448bbfc4a903 (diff) | |
Add containerfilemain
Diffstat (limited to 'Containerfile')
| -rw-r--r-- | Containerfile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..25ecd21 --- /dev/null +++ b/Containerfile @@ -0,0 +1,44 @@ +# HTML 2 Gemini converter +FROM alpine:3.24 AS builder + +# Install build dependencies +RUN apk add --no-cache \ + python3 \ + py3-pip \ + gcc \ + musl-dev \ + python3-dev + +WORKDIR /build + +# Create virtual environment +RUN python3 -m venv /build/venv + +COPY requirements.txt . + +RUN . /build/venv/bin/activate && \ + pip install --no-cache-dir -r requirements.txt + +# Final runtime stage +FROM alpine:3.24 + +LABEL maintainer="Uvokchee" \ + description="HTML to Gemini converter" \ + version="1.0" + +# Install runtime dependencies +RUN apk add --no-cache python3 + +WORKDIR /app + +# Copy virtual environment from builder +COPY --from=builder /build/venv /app/venv + +# Copy application files +COPY main.py . +COPY converters ./converters + +# Set environment variables +ENV PATH=/app/venv/bin:$PATH \ + PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 |
