ci-images/tmf-ci-python (sha256:1f40963388e51ed1ea4e9fd7b831bd14eaea8604356e83a4f9052910d26bc904)
Published 2026-11-02 03:32:13 -03:00 by tarcisio
Installation
docker pull git.trademarketingforce.com/tmf/ci-images/tmf-ci-python@sha256:1f40963388e51ed1ea4e9fd7b831bd14eaea8604356e83a4f9052910d26bc904sha256:1f40963388e51ed1ea4e9fd7b831bd14eaea8604356e83a4f9052910d26bc904About this package
Imagem CI Python compartilhada — projetos TMF/DANI (derivada de tmf-python-base)
Image layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1791158400' |
| 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.15 |
| ENV PYTHON_SHA256=c2c4321961fab0fb999d66e0cecf521c2ab3994c7992873ea99e306c1094fd5a |
| RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev g++ 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 |
| ARG APT_REFRESH=20261006 |
| RUN |1 APT_REFRESH=20261006 /bin/sh -c echo "apt refresh: ${APT_REFRESH}" && 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 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libharfbuzz-subset0 libffi-dev shared-mime-info fonts-liberation fonts-dejavu-core curl ca-certificates git && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |1 APT_REFRESH=20261006 /bin/sh -c printf 'uv==0.13.5 \\\n --hash=sha256:2386c2dc9b59fc1d39b1c500e4319d71d3268232eb3b38e29cd6775d6269e8d4 \\\n --hash=sha256:91e58e304b63b6c91bac5561459ab0c3ea24f17bc01ea9359d69fed72142978f \\\n --hash=sha256:d162669e3a7811c584b03690eaa11e796ad1d309aa8229d5dfe3cbcd68a90400 \\\n --hash=sha256:fa8d26e08e34c29c0c4e820cf3181757086d547240b4f4d31ff1d8bd810ca946\n' > /tmp/uv-req.txt && pip install --no-cache-dir --require-hashes -r /tmp/uv-req.txt && rm -f /tmp/uv-req.txt # buildkit |
| WORKDIR /tmp/base-deps |
| COPY requirements-base.txt . # buildkit |
| RUN |1 APT_REFRESH=20261006 /bin/sh -c pip install --no-cache-dir -r requirements-base.txt && rm -rf /tmp/base-deps # buildkit |
| RUN |1 APT_REFRESH=20261006 /bin/sh -c groupadd -g 10001 app && useradd -u 10001 -g app -m -s /usr/sbin/nologin app # 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 |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends make pkg-config xz-utils python3 ffmpeg libmagic1 tesseract-ocr-eng tesseract-ocr-spa jq && apt-get upgrade -y && rm -rf /var/lib/apt/lists/* # buildkit |
| ARG NODE_VERSION=v20.20.2 |
| ARG NODE_BIN_SHA256_X64=6295488653f0d93b0a157841746fef7e72cc4328cfb60c4bbe0ca2668a836ffd |
| ARG NODE_BIN_SHA256_ARM64=05a69ccdcb795f2a8b86c145e71a6a37cce84fccef5aaf25a8fe38bc9423e732 |
| ARG TARGETARCH=amd64 |
| COPY /usr/local/bin/node /usr/local/bin/node # buildkit |
| COPY /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm # buildkit |
| RUN |4 NODE_VERSION=v20.20.2 NODE_BIN_SHA256_X64=6295488653f0d93b0a157841746fef7e72cc4328cfb60c4bbe0ca2668a836ffd NODE_BIN_SHA256_ARM64=05a69ccdcb795f2a8b86c145e71a6a37cce84fccef5aaf25a8fe38bc9423e732 TARGETARCH=amd64 /bin/sh -c set -eux; case "${TARGETARCH:-amd64}" in amd64) NODE_BIN_SHA256="${NODE_BIN_SHA256_X64}" ;; arm64) NODE_BIN_SHA256="${NODE_BIN_SHA256_ARM64}" ;; *) echo "ERRO: arquitetura ${TARGETARCH} sem hash do Node fixado neste Dockerfile" >&2; exit 1 ;; esac; echo "${NODE_BIN_SHA256} /usr/local/bin/node" | sha256sum -c -; ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm; ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx; node --version | grep -qx "${NODE_VERSION}"; npm --version # buildkit |
| ARG CLAUDE_CODE_VERSION=2.1.197 |
| RUN |5 NODE_VERSION=v20.20.2 NODE_BIN_SHA256_X64=6295488653f0d93b0a157841746fef7e72cc4328cfb60c4bbe0ca2668a836ffd NODE_BIN_SHA256_ARM64=05a69ccdcb795f2a8b86c145e71a6a37cce84fccef5aaf25a8fe38bc9423e732 TARGETARCH=amd64 CLAUDE_CODE_VERSION=2.1.197 /bin/sh -c npm install -g "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" && claude --version && claude --version | grep -q "^${CLAUDE_CODE_VERSION} " # buildkit |
| ARG RUFF_VERSION=0.15.22 |
| ARG PYTEST_VERSION=9.1.1 |
| ARG PYTEST_COV_VERSION=7.1.0 |
| ARG HTTPX_VERSION=0.28.1 |
| RUN |9 NODE_VERSION=v20.20.2 NODE_BIN_SHA256_X64=6295488653f0d93b0a157841746fef7e72cc4328cfb60c4bbe0ca2668a836ffd NODE_BIN_SHA256_ARM64=05a69ccdcb795f2a8b86c145e71a6a37cce84fccef5aaf25a8fe38bc9423e732 TARGETARCH=amd64 CLAUDE_CODE_VERSION=2.1.197 RUFF_VERSION=0.15.22 PYTEST_VERSION=9.1.1 PYTEST_COV_VERSION=7.1.0 HTTPX_VERSION=0.28.1 /bin/sh -c pip install --no-cache-dir ruff==${RUFF_VERSION} pytest==${PYTEST_VERSION} pytest-cov==${PYTEST_COV_VERSION} httpx==${HTTPX_VERSION} # buildkit |
| COPY ci-images/images/python-ci/requirements-common.txt . # buildkit |
| RUN |9 NODE_VERSION=v20.20.2 NODE_BIN_SHA256_X64=6295488653f0d93b0a157841746fef7e72cc4328cfb60c4bbe0ca2668a836ffd NODE_BIN_SHA256_ARM64=05a69ccdcb795f2a8b86c145e71a6a37cce84fccef5aaf25a8fe38bc9423e732 TARGETARCH=amd64 CLAUDE_CODE_VERSION=2.1.197 RUFF_VERSION=0.15.22 PYTEST_VERSION=9.1.1 PYTEST_COV_VERSION=7.1.0 HTTPX_VERSION=0.28.1 /bin/sh -c pip install --no-cache-dir -r requirements-common.txt # buildkit |
| ARG BUILD_DATE=2026-11-02T06:29:13Z |
| ARG VERSION=3.12-20261102-f52ad72 |
| LABEL org.opencontainers.image.title=tmf-ci-python org.opencontainers.image.description=Imagem CI Python compartilhada — projetos TMF/DANI (derivada de tmf-python-base) org.opencontainers.image.version=3.12-20261102-f52ad72 org.opencontainers.image.created=2026-11-02T06:29:13Z |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.created | 2026-11-02T06:29:13Z |
| org.opencontainers.image.description | Imagem CI Python compartilhada — projetos TMF/DANI (derivada de tmf-python-base) |
| org.opencontainers.image.licenses | proprietary |
| org.opencontainers.image.source | https://git.trademarketingforce.com/TMF/base-images |
| org.opencontainers.image.title | tmf-ci-python |
| org.opencontainers.image.vendor | Trade Marketing Force |
| org.opencontainers.image.version | 3.12-20261102-f52ad72 |
Details
2026-11-02 03:32:13 -03:00
Versions (13)
View all
Container
0
OCI / Docker
linux/amd64
proprietary
837 MiB
3.12-20261102-f52ad72
2026-11-02
3.12
2026-11-02
latest
2026-11-02
3.12-20261101-f52ad72
2026-11-01
3.12-20261026-2f0dc5f
2026-10-26