dani (sha256:1ee6aa02cd72e39936a1e54b9229a4c4a13819eaaaa1578c569759b1f402a375)
Published 2026-06-28 15:24:08 -03:00 by tarcisio
Installation
docker pull git.trademarketingforce.com/tarcisio/dani@sha256:1ee6aa02cd72e39936a1e54b9229a4c4a13819eaaaa1578c569759b1f402a375sha256:1ee6aa02cd72e39936a1e54b9229a4c4a13819eaaaa1578c569759b1f402a375About this package
Imagem base Python 3.12 com deps comuns + processamento de documento/RAG (piloto DANI)
Image layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1782172800' |
| ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV LANG=C.UTF-8 |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; apt-get dist-clean # buildkit |
| ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 |
| ENV PYTHON_VERSION=3.12.13 |
| ENV PYTHON_SHA256=c08bc65a81971c1dd5783182826503369466c7e67374d1646519adf05207b684 |
| RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; case "$arch" in amd64|arm64) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; ;; i386) ;; *) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; ;; esac; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; apt-get dist-clean; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 --version # buildkit |
| RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit |
| CMD ["python3"] |
| ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1 |
| RUN /bin/sh -c apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends gcc g++ libpq-dev postgresql-client libjpeg-dev zlib1g-dev libpng-dev libfreetype6-dev tesseract-ocr tesseract-ocr-por poppler-utils libxml2-dev libxslt1-dev curl ca-certificates git && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c pip install --no-cache-dir uv==0.11.24 # buildkit |
| WORKDIR /tmp/base-deps |
| COPY requirements-base.txt . # buildkit |
| RUN /bin/sh -c pip install --no-cache-dir -r requirements-base.txt && rm -rf /tmp/base-deps # buildkit |
| WORKDIR /app |
| HEALTHCHECK {Test:[CMD-SHELL python -c "import sys; sys.exit(0)" || exit 1] Interval:30s Timeout:5s StartPeriod:10s StartInterval:0s Retries:3} |
| LABEL org.opencontainers.image.source=https://git.trademarketingforce.com/TMF/base-images org.opencontainers.image.title=tmf-python-base org.opencontainers.image.description=Imagem base Python 3.12 com deps comuns + processamento de documento/RAG (piloto DANI) org.opencontainers.image.licenses=proprietary org.opencontainers.image.vendor=Trade Marketing Force |
| ARG IMAGE_TAG=qa |
| ARG APP_VERSION=qa-a240668c7efe |
| ARG BUILD_DATE=2026-06-28T18:19:46Z |
| LABEL maintainer=TMF <contato@tmf.com> |
| LABEL description=DANI - Digital Allergist and Immunology Intelligence |
| LABEL version=qa-a240668c7efe |
| LABEL build_date=2026-06-28T18:19:46Z |
| ENV IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=/app SERVICE_MODE=all WORKERS=2 PORT=8000 |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c find /etc/apt -name "*.list" -o -name "*.sources" | xargs -r sed -i 's|http://deb.debian.org|https://deb.debian.org|g' && apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends nginx supervisor libpango-1.0-0 libpangocairo-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 shared-mime-info && rm -rf /var/lib/apt/lists/* && rm -f /etc/nginx/sites-enabled/default # buildkit |
| COPY /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages # buildkit |
| COPY /usr/local/bin /usr/local/bin # buildkit |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c pip install --no-cache-dir --force-reinstall bcrypt==4.0.1 # buildkit |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c python -c "import pgvector; print(f'pgvector OK')" && python -c "import fastapi; print(f'fastapi OK')" && python -c "import sqlalchemy; print(f'sqlalchemy OK')" && python -c "import bcrypt; assert bcrypt.__version__ == '4.0.1', f'bcrypt {bcrypt.__version__} != 4.0.1'; print('bcrypt 4.0.1 OK')" && python -c "import weasyprint; print('weasyprint OK')" && python -c "import jinja2; print(f'jinja2 {jinja2.__version__} OK')" # buildkit |
| WORKDIR /app |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c mkdir -p /app/data/articles /app/data/vectorstore /app/data/cache /app/data/uploads /app/logs /var/log/supervisor /var/log/nginx /usr/share/nginx/html # buildkit |
| COPY backend/app/ ./app/ # buildkit |
| COPY backend/integrations/ ./integrations/ # buildkit |
| COPY backend/knowledge/ ./knowledge/ # buildkit |
| COPY backend/workers/ ./workers/ # buildkit |
| COPY backend/database/ ./database/ # buildkit |
| COPY backend/config/ ./config/ # buildkit |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c find /app -type f \( -name '.env' -o -name '.env.*' ! -name '.env.example' \) -delete # buildkit |
| COPY backend/celery_app.py ./ # buildkit |
| COPY backend/scripts/import/ ./scripts/import/ # buildkit |
| COPY backend/scripts/migrations/ ./scripts/migrations/ # buildkit |
| COPY backend/scripts/prod/ ./scripts/prod/ # buildkit |
| COPY backend/scripts/setup/ ./scripts/setup/ # buildkit |
| COPY backend/scripts/sync_releases_from_changelog.py ./scripts/sync_releases_from_changelog.py # buildkit |
| COPY CHANGELOG.md /app/CHANGELOG.md # buildkit |
| COPY /frontend/dist-vite /usr/share/nginx/html # buildkit |
| COPY infrastructure/brandbook /usr/share/nginx/brandbook # buildkit |
| COPY infrastructure/docker/nginx-unified.conf /etc/nginx/nginx.conf # buildkit |
| COPY infrastructure/docker/nginx-unified-default.conf /etc/nginx/conf.d/default.conf # buildkit |
| COPY infrastructure/docker/nginx-brandbook.conf /etc/nginx/conf.d/brandbook.conf # buildkit |
| COPY infrastructure/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| COPY infrastructure/docker/docker-entrypoint-unified.sh /app/docker-entrypoint.sh # buildkit |
| RUN |3 IMAGE_TAG=qa APP_VERSION=qa-a240668c7efe BUILD_DATE=2026-06-28T18:19:46Z /bin/sh -c chmod +x /app/docker-entrypoint.sh && chown -R www-data:www-data /usr/share/nginx/html && chown -R www-data:www-data /usr/share/nginx/brandbook && chown -R www-data:www-data /var/log/nginx # buildkit |
| EXPOSE [80/tcp 8000/tcp] |
| HEALTHCHECK {Test:[CMD-SHELL curl -f http://localhost/health || curl -f http://localhost:8000/health || exit 1] Interval:30s Timeout:10s StartPeriod:5m0s StartInterval:0s Retries:5} |
| ENTRYPOINT ["/app/docker-entrypoint.sh"] |
| CMD ["supervisord" "-c" "/etc/supervisor/conf.d/supervisord.conf"] |
Labels
| Key | Value |
|---|---|
| build_date | 2026-06-28T18:19:46Z |
| description | DANI - Digital Allergist and Immunology Intelligence |
| maintainer | TMF <contato@tmf.com> |
| org.opencontainers.image.description | Imagem base Python 3.12 com deps comuns + processamento de documento/RAG (piloto DANI) |
| org.opencontainers.image.licenses | proprietary |
| org.opencontainers.image.source | https://git.trademarketingforce.com/TMF/base-images |
| org.opencontainers.image.title | tmf-python-base |
| org.opencontainers.image.vendor | Trade Marketing Force |
| version | qa-a240668c7efe |
Details
2026-06-28 15:24:08 -03:00
Versions (10)
View all
Container
0
OCI / Docker
linux/amd64
proprietary
516 MiB
qa
2026-07-01
sha-63483c1fe180
2026-07-01
sha-0bddd3872591
2026-06-30
sha-89894152bceb
2026-06-30
sha-1881dd8f524d
2026-06-29