Bootstrap: docker From: debian:bookworm-slim %labels Author ATGC Tool TNT %help Build a TNT Apptainer image by downloading the upstream TNT Linux archive during the image build. Upstream archive: https://www.lillo.org.ar/phylogeny/tnt/tnt-linux.zip Note: TNT licensing may restrict redistribution of the resulting image. %files tnt/container_entrypoint.bash /usr/local/bin/tnt-entrypoint %post set -eu export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y --no-install-recommends \ bash \ ca-certificates \ python3 \ unzip \ wget apt-get clean rm -rf /var/lib/apt/lists/* chmod 0755 /usr/local/bin/tnt-entrypoint mkdir -p /tmp/tnt-build /opt/tnt-src /opt/tnt archive="/tmp/tnt-build/tnt-linux.zip" wget -O "${archive}" "https://www.lillo.org.ar/phylogeny/tnt/tnt-linux.zip" unzip -q "${archive}" -d /opt/tnt-src tnt_binary="$(find /opt/tnt-src -type f -path '*/TNT-bin/tnt' | head -n1)" if [ -z "${tnt_binary}" ]; then echo "Unable to locate TNT-bin/tnt in the downloaded archive." >&2 exit 1 fi install_root="$(dirname "$(dirname "${tnt_binary}")")" cp -a "${install_root}/." /opt/tnt/ chmod -R a+rX /opt/tnt chmod 0755 /opt/tnt/TNT-bin/tnt rm -rf /opt/tnt-src /tmp/tnt-build %environment export TNT_HOME=/opt/tnt export PATH=/opt/tnt/TNT-bin:$PATH export LD_LIBRARY_PATH=/opt/tnt/TNT-bin${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} %runscript exec /usr/local/bin/tnt-entrypoint "$@"