images/tmf-management (sha256:7595678dd48a0a1bc601c5cdde89d8d3346c831bbab23806826b158934b0adbe)
Published 2026-10-31 18:47:17 -03:00 by tarcisio
Installation
docker pull git.trademarketingforce.com/tmf/images/tmf-management@sha256:7595678dd48a0a1bc601c5cdde89d8d3346c831bbab23806826b158934b0adbesha256:7595678dd48a0a1bc601c5cdde89d8d3346c831bbab23806826b158934b0adbeAbout this package
Imagem base Python 3.12 Alpine THIN (uv embutido, deps via uv.lock do consumidor) — frota uv+3.12 (INFRA-58022)
Image layers
| ADD alpine-minirootfs-3.24.3-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| 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; apk add --no-cache ca-certificates tzdata ; # buildkit |
| ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 |
| ENV PYTHON_VERSION=3.12.15 |
| ENV PYTHON_SHA256=c2c4321961fab0fb999d66e0cecf521c2ab3994c7992873ea99e306c1094fd5a |
| RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps bluez-dev bzip2-dev dpkg-dev dpkg findutils g++ gcc gdbm-dev gnupg libc-dev libffi-dev libnsl-dev libtirpc-dev linux-headers make ncurses-dev openssl-dev pax-utils readline-dev sqlite-dev tar tcl-dev tk tk-dev util-linux-dev xz xz-dev zlib-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-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; arch="$(apk --print-arch)"; case "$arch" in x86_64|aarch64) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; ;; x86) ;; *) 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 '{}' + ; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | xargs -rt apk add --no-network --virtual .python-rundeps ; apk del --no-network .build-deps; 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 apk add --no-cache libpq postgresql-client tesseract-ocr tesseract-ocr-data-por poppler-utils cairo pango harfbuzz gdk-pixbuf fontconfig ttf-liberation libjpeg-turbo zlib freetype libpng libxml2 libxslt libffi openssl xmlsec hiredis bash curl ca-certificates git # buildkit |
| RUN /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 |
| RUN /bin/sh -c addgroup -g 10001 -S app && adduser -u 10001 -S -G app -s /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/infra org.opencontainers.image.title=tmf-python-base org.opencontainers.image.description=Imagem base Python 3.12 Alpine THIN (uv embutido, deps via uv.lock do consumidor) — frota uv+3.12 (INFRA-58022) org.opencontainers.image.licenses=proprietary org.opencontainers.image.vendor=Trade Marketing Force |
| ENV UV_PROJECT_ENVIRONMENT=/usr/local UV_PYTHON=/usr/local/bin/python3 UV_PYTHON_DOWNLOADS=never UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy |
| RUN /bin/sh -c apk add --no-cache nginx supervisor # buildkit |
| RUN /bin/sh -c addgroup -S terminal && adduser -S -D -H -s /sbin/nologin -G terminal terminal # buildkit |
| ARG KUBECTL_VERSION=v1.37.0 |
| ARG KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f |
| RUN |2 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f /bin/sh -c curl -fsSLO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && echo "${KUBECTL_SHA256} kubectl" | sha256sum -c - && install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && rm kubectl # buildkit |
| RUN |2 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f /bin/sh -c mkdir -p /app/backend /var/log/supervisor # buildkit |
| WORKDIR /app/backend |
| COPY backend/pyproject.toml backend/uv.lock ./ # buildkit |
| RUN |2 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f /bin/sh -c if [ -n "${PYPI_TOKEN:-}" ]; then printf 'machine git.trademarketingforce.com\nlogin forgejo\npassword %s\n' "${PYPI_TOKEN}" > /root/.netrc; chmod 600 /root/.netrc; fi; uv sync --frozen --no-dev --no-install-project; rc=$?; rm -f /root/.netrc; exit $rc # buildkit |
| COPY backend/ . # buildkit |
| COPY CHANGELOG.md /app/CHANGELOG.md # buildkit |
| COPY VERSION /app/VERSION # buildkit |
| ARG APP_VERSION=1.326.0 |
| ENV APP_VERSION=1.326.0 |
| ARG GIT_COMMIT= |
| ENV GIT_COMMIT= |
| COPY scripts/migrations /app/backend/scripts/migrations # buildkit |
| COPY backend/integrations /app/extensions # buildkit |
| COPY scripts/db-sync /scripts/db-sync # buildkit |
| COPY infrastructure/k8s/templates /app/k8s/templates # buildkit |
| COPY /app/frontend/dist /usr/share/nginx/html # buildkit |
| COPY infrastructure/ip-allowlist-daemon /tmp/ip-daemon # buildkit |
| RUN |4 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f APP_VERSION=1.326.0 GIT_COMMIT= /bin/sh -c bash /tmp/ip-daemon/package.sh && mkdir -p /usr/share/nginx/html/dl && cp /tmp/ip-daemon/dist/*.tar.gz /tmp/ip-daemon/dist/*.sha256 /usr/share/nginx/html/dl/ && (cp /tmp/ip-daemon/dist/*.zip /usr/share/nginx/html/dl/ 2>/dev/null || true) && rm -rf /tmp/ip-daemon && echo "Artefatos publicados em /dl:" && ls -1 /usr/share/nginx/html/dl/ # buildkit |
| RUN |4 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f APP_VERSION=1.326.0 GIT_COMMIT= /bin/sh -c rm -f /etc/nginx/http.d/default.conf # buildkit |
| COPY scripts/ci-cd/deploy/nginx.conf /etc/nginx/http.d/default.conf # buildkit |
| RUN |4 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f APP_VERSION=1.326.0 GIT_COMMIT= /bin/sh -c mkdir -p /etc/supervisor/conf.d # buildkit |
| COPY scripts/ci-cd/deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| COPY scripts/ci-cd/deploy/entrypoint.sh /entrypoint.sh # buildkit |
| RUN |4 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f APP_VERSION=1.326.0 GIT_COMMIT= /bin/sh -c chmod +x /entrypoint.sh # buildkit |
| EXPOSE [80/tcp] |
| HEALTHCHECK {Test:[CMD-SHELL curl -f http://localhost/health || exit 1] Interval:30s Timeout:10s StartPeriod:5s StartInterval:0s Retries:3} |
| RUN |4 KUBECTL_VERSION=v1.37.0 KUBECTL_SHA256=6129359f4e1f3848a5572ccb0b26cf28b8ca08cef38c95a765b2f64a2c961a2f APP_VERSION=1.326.0 GIT_COMMIT= /bin/sh -c [ "$(id -u app)" = "10001" ] && install -d -o app -g app -m 0750 /run/app && install -d -o app -g app -m 0750 /home/app/.kube /home/app/.aws && install -d -o app -g app -m 0755 /app/uploads /app/backend/storage /app/k8s/clients /app/k8s/generated /app/k8s/tofu/clients /data/payslips /data/hr-documents # buildkit |
| ENTRYPOINT ["/entrypoint.sh"] |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.description | Imagem base Python 3.12 Alpine THIN (uv embutido, deps via uv.lock do consumidor) — frota uv+3.12 (INFRA-58022) |
| org.opencontainers.image.licenses | proprietary |
| org.opencontainers.image.source | https://git.trademarketingforce.com/TMF/infra |
| org.opencontainers.image.title | tmf-python-base |
| org.opencontainers.image.vendor | Trade Marketing Force |
Details
2026-10-31 18:47:17 -03:00
Versions (253)
View all
Container
0
OCI / Docker
linux/amd64
proprietary
596 MiB
latest
2026-11-04
sha-4b9b0799ef81
2026-11-04
v1.328.0
2026-11-04
sha-38cd19345f77
2026-11-04
v1.327.0
2026-11-04