diff options
| author | uvok cheetah | 2026-06-16 10:03:03 +0200 |
|---|---|---|
| committer | uvok cheetah | 2026-06-16 10:03:03 +0200 |
| commit | f84a427f1d9153b4f9b59b38de6e704a1ac61754 (patch) | |
| tree | 3b65d34cbbd999d80456fa71890bb7e9310fd023 /_ci/Containerfile.h2g | |
| parent | 4dd4d4adbe72b3dc7b5cb2675e30b7bb1f4a568b (diff) | |
Add container
Diffstat (limited to '_ci/Containerfile.h2g')
| -rw-r--r-- | _ci/Containerfile.h2g | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/_ci/Containerfile.h2g b/_ci/Containerfile.h2g new file mode 100644 index 0000000..98f62b0 --- /dev/null +++ b/_ci/Containerfile.h2g @@ -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 _html2gemini/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 _html2gemini/main.py . +COPY _html2gemini/converters ./converters + +# Set environment variables +ENV PATH=/app/venv/bin:$PATH \ + PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 |
