| # debian.sh --arch 'amd64' out/ 'trixie' '@1777939200' |
| 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"] |
| ARG PACKER_VERSION |
| ENV DEBIAN_FRONTEND=noninteractive PIP_ROOT_USER_ACTION=ignore |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl unzip git openssh-client openssl gosu && rm -rf /var/lib/apt/lists/* |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c curl -fsSL "https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip" -o /tmp/packer.zip && unzip /tmp/packer.zip -d /usr/local/bin/ && rm /tmp/packer.zip && chmod +x /usr/local/bin/packer |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c useradd -u 1001 -g users -s /bin/bash -m -d /home/portal portal |
| WORKDIR /app |
| COPY file:53438f4b2e4cee0d89a33c493bdf465aa7017c637447ce66a4abfd7d25e25d20 in ./ |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir ansible ansible-runner |
| COPY file:019f8c44893610446ba9361b0af0372ef64a8c9526b2832395af0c9da5abf5f6 in ./ansible/requirements.yml |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c ansible-galaxy collection install -r ./ansible/requirements.yml |
| ENV PACKER_PLUGIN_PATH=/app/.packer.d/plugins |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c mkdir -p "${PACKER_PLUGIN_PATH}" |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c packer plugins install github.com/hashicorp/proxmox || true |
| COPY dir:21da92ed83abbabdf09f27b804d527ba87dc8fab36f0d54f0603f1174e5e7374 in ./backend/ |
| COPY dir:a8c5d7c283f74311d02ad16fbe24b6bbf62d9619ff924460fdb3766fdbb96d27 in ./ansible/ |
| COPY dir:6eafab7031711af6c12dc7f8fb5da113072456d9219d617e810ec58be8d55419 in ./packer/ |
| COPY file:efab52de50731393954ea0004983a38e6c3ccccb1d49eb2c4b2549280aa07598 in /app/plus.enc |
| COPY dir:0e0bdeb799060f6e708bf524ea9e94b80cea2acd1df76f9a7369310b525d4ab6 in ./frontend/dist/ |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c mkdir -p /app/data /app/ssl && chown -R portal:users /app |
| COPY file:d158eedf2a9236f8dd52a721ecd6b41630122e5bda7f6ad365c475a95db5f5eb in /entrypoint.sh |
| |1 PACKER_VERSION=1.11.2 /bin/sh -c chmod +x /entrypoint.sh |
| EXPOSE 8443 |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 CMD curl -fk https://localhost:8443/api/health || exit 1 |
| ENTRYPOINT ["/entrypoint.sh"] |