Core base Docker image for Data Artifex with Python 3.14, QSV, toolkits, and uv.
499
dartfx/base is the official core base Docker image for the Data Artifex platform. It provides a secure, high-performance runtime environment with pre-installed system utilities (such as qsv, curl, and jq) and a synchronized Python virtual environment containing the core Data Artifex libraries (dartfx-utils, ddi-toolkit, qsv-toolkit, rdf-toolkit, dartfx-unf), cataloguing and harvesting toolkits (ckan-toolkit, dataverse-toolkit, nada-toolkit), and the psycopg PostgreSQL driver.
/opt/venv (pre-configured in the PATH).dartfx-utils, ddi-toolkit, qsv-toolkit, rdf-toolkit, dartfx-unf), cataloguing and harvesting packages (ckan-toolkit, dataverse-toolkit, nada-toolkit), and psycopg[binary].qsv (including Polars SQL engine sqlp, Luau scripting, format conversions to, and geocoding geocode imported from dartfx/qsv), plus curl, jq, and certificates.appuser (UID 10001, GID 10001 under appgroup).--read-only).To build a new service on top of this base image, use a multi-stage Dockerfile that leverages uv to sync dependencies into the pre-existing virtual environment (/opt/venv).
Ensure your service has a pyproject.toml at its root:
my-service/
├── Dockerfile
├── pyproject.toml
└── src/
└── my_service/
├── __init__.py
└── main.py
pyproject.tomlDefine your service metadata and dependencies:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-service"
version = "0.1.0"
dependencies = [
"httpx",
"pydantic>=2.0"
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/my_service"]
Dockerfile# --- Builder Stage ---
FROM dartfx/base:latest AS builder
WORKDIR /app
# Install uv for fast package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Copy project configuration files first to optimize layer caching
COPY pyproject.toml ./
# Install project dependencies into the virtual environment /opt/venv
RUN uv pip install --no-cache -r pyproject.toml
# Copy project source code
COPY . /app
# Install the project itself (without reinstalling dependencies)
RUN uv pip install --no-cache --no-deps .
# --- Runtime Stage ---
FROM dartfx/base:latest
WORKDIR /app
# Copy the updated virtual environment and application code with proper ownership
COPY --from=builder --chown=appuser:appgroup /opt/venv /opt/venv
COPY --chown=appuser:appgroup . /app
# Run as the default non-root user
USER appuser
# Start your service entrypoint
CMD ["python", "-m", "my_service.main"]
You can run the base image directly to check the Python environment:
docker run --rm dartfx/base:latest python -c "import dartfx.utils; print('dartfx-utils imported successfully!')"
Read-Only Root Filesystem: Configure your container orchestrator (e.g., Kubernetes or ECS) to run with a read-only root filesystem (readOnlyRootFilesystem: true). Mount a tmpfs volume at /tmp if your application needs to write temporary files.
Pin Base Image Versions: For production stability, pin the base image to a specific version tag or digest:
FROM dartfx/base:0.2.0
Secrets Management: Never build secrets (API keys, database credentials) into your image layers. Always inject them at runtime via environment variables.
Maintained by Data Artifex
Support: [email protected]
GitHub: https://github.com/dataartifex
Content type
Image
Digest
sha256:8f872c14a…
Size
256.7 MB
Last updated
8 days ago
docker pull dartfx/base