Files
bikoret/deploy/docker/Dockerfile.shoresh_engine
T
Scott KarpandClaude Opus 4.6 edb74da0b4 Fix shoresh engine Dockerfile: Debian Buster repos are EOL
haskell:9.6.4-slim is based on Debian Buster, which reached EOL.
The standard deb.debian.org repos return 404. Redirected to
archive.debian.org for zlib1g-dev installation.

Verified: shoresh-engine image builds successfully (128MB).

All 4 Docker images now build:
  vav-pipeline:      111MB
  shoresh-engine:    128MB
  korban-processor:  187MB
  talmudic-engine:   292MB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 17:30:31 -04:00

49 lines
1.5 KiB
Docker

# Shorashim Shoresh Engine — Haskell root activation engine
# Construction spec §1.1: GHC 9.6.4, Cabal 3.10
# Communicates with vav_pipeline via Erlang Port (stdin/stdout)
# === BUILD STAGE ===
FROM haskell:9.6.4-slim AS build
# haskell:9.6.4-slim is Debian Buster (EOL) — use archive repos
RUN sed -i 's|deb.debian.org/debian|archive.debian.org/debian|g' /etc/apt/sources.list && \
sed -i 's|deb.debian.org/debian-security|archive.debian.org/debian-security|g' /etc/apt/sources.list && \
sed -i '/buster-updates/d' /etc/apt/sources.list && \
apt-get update && apt-get install -y zlib1g-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy cabal files first for dependency caching
COPY shoresh-engine/shoresh-engine.cabal ./
COPY shoresh-engine/cabal.project.freeze ./
RUN cabal update && cabal build --only-dependencies
# Copy source and build
COPY shoresh-engine/ ./
RUN cabal build && \
cp $(cabal list-bin shoresh-engine) /usr/local/bin/shoresh-engine
# === RUNTIME STAGE ===
FROM ubuntu:jammy-20240125
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgmp10 zlib1g && \
rm -rf /var/lib/apt/lists/*
RUN useradd --create-home --shell /bin/bash shorashim
USER shorashim
WORKDIR /home/shorashim
COPY --from=build /usr/local/bin/shoresh-engine ./shoresh-engine
# L1 mount point — the engine reads Torah roots from L1
ENV L1_MOUNT_POINT=/mnt/torah
# The engine is invoked as an Erlang Port by vav_pipeline
# In K8s, it runs as a sidecar or is called via the Port protocol
CMD ["./shoresh-engine"]