# Build an environment for creating an AppImage. # Try to use a distro with an old libc to maximize support on as many linux # distros as possible for x86_64 and aarch64. FROM debian:10 ARG ARCH RUN apt-get -qq -y update && \ apt-get -qq -y dist-upgrade && \ apt-get -qq -y install bison \ bzip2 \ curl \ file \ flex \ gcc \ jq \ libcairo2-dev \ libev-dev \ libffi-dev \ libfribidi-dev \ libharfbuzz-dev \ libssl-dev \ libsqlite3-dev \ make \ patch \ wget \ xz-utils \ zlib1g-dev && \ apt-get -qq -y clean && \ apt-get -qq -y autoclean RUN mkdir -p /usr/local/AppDir/usr/bin # Install tools for making flame graphs RUN curl -o /usr/local/AppDir/usr/bin/stackcollapse-perf.pl -SsOL \ https://raw.githubusercontent.com/brendangregg/FlameGraph/master/stackcollapse-perf.pl && \ curl -o /usr/local/AppDir/usr/bin/flamegraph.pl -SsOL \ https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl && \ chmod +x /usr/local/AppDir/usr/bin/stackcollapse-perf.pl \ /usr/local/AppDir/usr/bin/flamegraph.pl ARG PYTHONMMVER="3.11" ARG PYTHONVER="${PYTHONMMVER}.1" RUN curl -o /tmp/Python-${PYTHONVER}.tgz -SsOL \ https://www.python.org/ftp/python/${PYTHONVER}/Python-${PYTHONVER}.tgz && \ tar -C /usr/local/src -xf /tmp/Python-${PYTHONVER}.tgz WORKDIR /usr/local/src/Python-${PYTHONVER} RUN ./configure --silent --prefix=/usr/local/AppDir/usr && \ make -s -j$(nproc) && \ make -s install && \ sed -i -e 's#/usr#././#g' /usr/local/AppDir/usr/bin/python${PYTHONMMVER} RUN /usr/local/AppDir/usr/bin/pip3 install docutils && \ sed -i "1s/.*/#!\/usr\/bin\/env python3/" \ /usr/local/AppDir/usr/bin/rst2html5.py # PostgreSQL 11 is the first release creating the pg_type_d.h include file for # CockroachDB binary support. ARG PGVER="11.18" RUN wget -O /tmp/postgresql-${PGVER}.tar.bz2 -q --no-check-certificate \ https://ftp.postgresql.org/pub/source/v${PGVER}/postgresql-${PGVER}.tar.bz2 && \ tar -C /usr/local/src -xf /tmp/postgresql-${PGVER}.tar.bz2 WORKDIR /usr/local/src/postgresql-${PGVER} RUN ./configure --silent --without-ldap --without-readline --without-zlib \ --without-gssapi --with-openssl --prefix=/usr && \ make -s -j $(nproc) install && \ sed -i -e 's#/usr#././#g' /usr/bin/psql && \ ldconfig ARG CMAKEVER="3.7.2" RUN curl -o /tmp/cmake-${CMAKEVER}-linux-${ARCH}.tar.gz -SsOL \ https://github.com/Kitware/CMake/releases/download/v${CMAKEVER}/cmake-${CMAKEVER}-linux-${ARCH}.tar.gz && \ tar -C /usr --strip-components=1 \ -xf /tmp/cmake-${CMAKEVER}-linux-${ARCH}.tar.gz # Install DBT Tools ARG DBTTOOLSVER="0.5.0" RUN curl -o /tmp/v${DBTTOOLSVER}.tar.gz -SsOL \ https://github.com/osdldbt/dbttools/archive/refs/tags/v${DBTTOOLSVER}.tar.gz && \ tar -C /usr/local/src -xf /tmp/v${DBTTOOLSVER}.tar.gz WORKDIR /usr/local/src/dbttools-${DBTTOOLSVER} RUN cmake -H. -Bbuilds/release -DCMAKE_INSTALL_PREFIX=/usr && \ (cd builds/release && make -s install DESTDIR=/usr/local/AppDir) && \ rm -f /tmp/v${DBTTOOLSVER}.tar.gz ARG SQLITE3VER=3410200 RUN wget -O /tmp/sqlite-autoconf-${SQLITE3VER}.tar.gz -q \ --no-check-certificate \ https://www.sqlite.org/2023/sqlite-autoconf-${SQLITE3VER}.tar.gz && \ tar -C /usr/local/src -xf /tmp/sqlite-autoconf-${SQLITE3VER}.tar.gz WORKDIR /usr/local/src/sqlite-autoconf-${SQLITE3VER} RUN ./configure --quiet --silent --prefix=/usr/local && \ make -s -j $(nproc) install && \ sed -i -e 's#/usr#././#g' /usr/local/bin/sqlite3 ARG PANGOVER="1.42" ARG PANGOMINORVER="4" RUN curl -o /tmp/pango-${PANGOVER}.${PANGOMINORVER}.tar.xz -SsOL \ https://download.gnome.org/sources/pango/${PANGOVER}/pango-${PANGOVER}.${PANGOMINORVER}.tar.xz && \ tar -C /usr/local/src -xf /tmp/pango-${PANGOVER}.${PANGOMINORVER}.tar.xz WORKDIR /usr/local/src/pango-${PANGOVER}.${PANGOMINORVER} RUN ./configure --quiet --silent --prefix=/usr/local && \ make -s -j $(nproc) install && \ ldconfig ARG GNUPLOTVER="5.4.6" RUN wget -O /tmp/gnuplot-${GNUPLOTVER}.tar.gz -q --no-check-certificate \ https://sourceforge.net/projects/gnuplot/files/gnuplot/5.4.6/gnuplot-5.4.6.tar.gz/download && \ tar -C /usr/local/src -xf /tmp/gnuplot-${GNUPLOTVER}.tar.gz WORKDIR /usr/local/src/gnuplot-${GNUPLOTVER} RUN ./configure -q --prefix=/usr/local --without-libcerf \ --without-latex --without-readline --without-lua \ --without-tektronix --with-qt=no --disable-history-file \ --disable-x11-external --disable-raise-console \ --disable-wxwidgets --disable-plugins \ --disable-dependency-tracking && \ make -s -j$(nproc) install && \ sed -i -e 's#/usr#././#g' /usr/local/bin/gnuplot ARG TSTOOLSVER="0.8.0" RUN curl -o /tmp/touchstone-tools-v${TSTOOLSVER}.tar.gz -SsOL \ https://gitlab.com/touchstone/touchstone-tools/-/archive/v${TSTOOLSVER}/touchstone-tools-v{TSTOOLSVER}.tar.gz && \ mkdir -p /usr/local/src/touchstone-tools-v${TSTOOLSVER} && \ tar -C /usr/local/src/touchstone-tools-v${TSTOOLSVER} \ --strip-components=1 \ -xf /tmp/touchstone-tools-v${TSTOOLSVER}.tar.gz WORKDIR /usr/local/src/touchstone-tools-v${TSTOOLSVER} RUN cmake -H. -Bbuilds/release -DCMAKE_INSTALL_PREFIX=/usr && \ (cd builds/release && make -s install DESTDIR=/usr/local/AppDir) && \ rm -f /tmp/touchstone-tools-v${TSTOOLSVER}.tar.gz WORKDIR /usr/local RUN curl -SsOL \ https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-static-${ARCH}.AppImage && \ chmod +x linuxdeploy-static-${ARCH}.AppImage && \ ./linuxdeploy-static-${ARCH}.AppImage --appimage-extract RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ -o /tmp/sh.rustup.sh && \ sh /tmp/sh.rustup.sh -y RUN ${HOME}/.cargo/bin/cargo install toml-cli RUN sed -i -e 's#/usr#././#g' /usr/bin/jq RUN sed -i -e 's#/usr#././#g' /usr/bin/perl RUN sed -i -e 's#/usr#././#g' ${HOME}/.cargo/bin/toml