data-import (sha256:124e85e6c1b3a7c2bb03ecbbdc38b696c7e8e629068692b964a1067f1bcdd463)
Published 2026-10-01 17:25:03 +00:00 by benjamin
Installation
docker pull git.delpech.dev/benjamin/data-import@sha256:124e85e6c1b3a7c2bb03ecbbdc38b696c7e8e629068692b964a1067f1bcdd463sha256:124e85e6c1b3a7c2bb03ecbbdc38b696c7e8e629068692b964a1067f1bcdd463Image layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1789689600' |
| 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.14 |
| ENV PYTHON_SHA256=5c8462af5790baf43a321a1559dbe0db06d1be4300fb85fb53c40060668e548a |
| 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"] |
| RUN /bin/sh -c pip install --no-cache-dir psycopg2-binary==2.9.9 duckdb==1.3.0 pyshp==2.3.1 PyYAML==6.0.2 && pip check # buildkit |
| ARG MC_VERSION=RELEASE.2025-08-13T08-35-41Z |
| ARG MC_SHA256=01f866e9c5f9b87c2b09116fa5d7c06695b106242d829a8bb32990c00312e891 |
| ADD https://github.com/minio/mc/releases/download/RELEASE.2025-08-13T08-35-41Z/mc.linux-amd64.RELEASE.2025-08-13T08-35-41Z /usr/local/bin/mc # buildkit |
| RUN |2 MC_VERSION=RELEASE.2025-08-13T08-35-41Z MC_SHA256=01f866e9c5f9b87c2b09116fa5d7c06695b106242d829a8bb32990c00312e891 /bin/sh -c echo "${MC_SHA256} /usr/local/bin/mc" | sha256sum -c - && chmod +x /usr/local/bin/mc # buildkit |
| WORKDIR /app |
| COPY scripts/common.py scripts/data_run_manifest.py scripts/archive_capture.py scripts/archive_s3.py scripts/import-dvf-addressing.py scripts/import-bdnb-addressing.py scripts/import-rnc-complet.py scripts/import-bdnb-france.py scripts/import-carte-loyers.py scripts/import-annuaire-education.py scripts/import-dpe-reference-bulk.py scripts/import-radon-communes.py scripts/import-zonage-sismique.py scripts/import-ban-adresses.py scripts/capture-ban-plus.py ./ # buildkit |
| RUN |2 MC_VERSION=RELEASE.2025-08-13T08-35-41Z MC_SHA256=01f866e9c5f9b87c2b09116fa5d7c06695b106242d829a8bb32990c00312e891 /bin/sh -c python -m venv /app/.venv-datacontract && /app/.venv-datacontract/bin/pip install --no-cache-dir 'datacontract-cli[postgres]==1.1.0' && /app/.venv-datacontract/bin/pip check && /app/.venv-datacontract/bin/datacontract --version # buildkit |
| RUN |2 MC_VERSION=RELEASE.2025-08-13T08-35-41Z MC_SHA256=01f866e9c5f9b87c2b09116fa5d7c06695b106242d829a8bb32990c00312e891 /bin/sh -c python -c "import duckdb; duckdb.sql('INSTALL httpfs; INSTALL spatial')" # buildkit |
| COPY scripts/common.py scripts/data_run_manifest.py scripts/archive_s3.py scripts/ # buildkit |
| COPY scripts/dpe-batiment-reference-importer/import.py scripts/dpe-batiment-reference-importer/ # buildkit |
| COPY data-contracts/dpe_batiment_reference.yaml data-contracts/ # buildkit |
| ENV PYTHONUNBUFFERED=1 |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.created | 2026-10-01T17:24:59Z |
| org.opencontainers.image.revision | b84ddb245727ed852d60956bef930ce607fd80fb |
Details
2026-10-01 17:25:03 +00:00
Versions (313)
View all
Container
170
OCI / Docker
linux/amd64
267 MiB
main-20261006074829-3bb3baf
2026-10-06
main-latest
2026-10-06
gate-20261006074829-3bb3baf
2026-10-06
ci-37430576357-1
2026-10-06