fix(docker): re-import failed because the Access CLI tools were never installed
Build and Push Images / Build jorgecuadros-web (push) Successful in 1m37s
Build and Push Images / Build jorgecuadros-api (push) Successful in 3m22s

The API image installed Alpine's `mdbtools` package, which ships only the
shared library. The command-line tools that migration/extract.py actually
shells out to -- `mdb-tables` and `mdb-export` -- are in the separate
`mdbtools-utils` subpackage, so the build succeeded and the re-import in the
"Operaciones" admin panel failed at run time with:

    RuntimeError: mdbtools not found on PATH (need mdb-tables and mdb-export)

Install `mdbtools-utils` instead; it pulls the library in as a dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 02:07:22 -07:00
co-authored by Claude Opus 5
parent 1934470d53
commit 567b033c46
+8 -1
View File
@@ -47,6 +47,13 @@ ENV NODE_ENV=production
# That breaks the pre-migrate deploy backup AND the whole "Operaciones" admin # That breaks the pre-migrate deploy backup AND the whole "Operaciones" admin
# panel (backup, restore, sync, re-import all shell out to these binaries). # panel (backup, restore, sync, re-import all shell out to these binaries).
# #
# mdbtools-utils, NOT mdbtools. Alpine splits the project: `mdbtools` is the
# shared library only, and the command-line tools migration/extract.py shells out
# to (`mdb-tables`, `mdb-export`) are in the -utils subpackage. Installing the
# wrong one builds fine and fails at run time — the re-import in the "Operaciones"
# panel dies with:
# RuntimeError: mdbtools not found on PATH (need mdb-tables and mdb-export)
#
# tesseract-ocr + tesseract-ocr-data-spa + poppler-utils drive the statement # tesseract-ocr + tesseract-ocr-data-spa + poppler-utils drive the statement
# OCR intake (RECEIPT_CAPTURE_SPEC §2): poppler's `pdftoppm` rasterises each # OCR intake (RECEIPT_CAPTURE_SPEC §2): poppler's `pdftoppm` rasterises each
# scanned page and tesseract reads it, with the Spanish traineddata for the # scanned page and tesseract reads it, with the Spanish traineddata for the
@@ -55,7 +62,7 @@ ENV NODE_ENV=production
# dependency. If they are absent the API still boots — the statements module # dependency. If they are absent the API still boots — the statements module
# reports itself unavailable and only that feature is disabled — but statement # reports itself unavailable and only that feature is disabled — but statement
# ingest is the point of shipping them. # ingest is the point of shipping them.
RUN apk add --no-cache python3 mdbtools mysql-client mariadb-connector-c openssl \ RUN apk add --no-cache python3 mdbtools-utils mysql-client mariadb-connector-c openssl \
tesseract-ocr tesseract-ocr-data-spa poppler-utils \ tesseract-ocr tesseract-ocr-data-spa poppler-utils \
&& apk add --no-cache --virtual .pybuild python3-dev build-base \ && apk add --no-cache --virtual .pybuild python3-dev build-base \
&& rm -rf /var/cache/apk/* && rm -rf /var/cache/apk/*