FROM python:3.11-slim
# Metadata
LABEL maintainer="dlthub" \
org.label-schema.vendor="dltHub" \
org.label-schema.url="https://dlthub.com" \
org.label-schema.name="dlt" \
org.label-schema.description="**data load tool (dlt)** is a simple, open source Python library that makes data loading easy."
ENV PYTHONUNBUFFERED=1
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
ca-certificates \
libffi-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Prepare workdir and copy source
WORKDIR /opt/dlt
COPY . /opt/dlt/
# Build tools
RUN python -m pip install --upgrade pip setuptools wheel
# Install the project from source (no extras by default)
RUN pip install --no-cache-dir .
# Basic smoke checks for CLI visibility (import test omitted to avoid shell quoting issues)
RUN dlt --version
RUN dlt --help
# Default command: run the CLI if available, otherwise fall back to module entrypoint
CMD ["dlt"]