<commit_before>#!/bin/sh -ex

personality="$1"

dependencies="\
    appstream-util \
    autoconf \
    automake \
    build-essential \
    chromium \
    clang \
    curl \
    dbus \
    gcc-multilib \
    gdb \
    git \
    glib-networking \
    glib-networking-dbgsym\
    gtk-doc-tools \
    gettext \
    libc6-dbg \
    libfontconfig1 \
    libglib2.0-0-dbgsym \
    libglib2.0-dev \
    libgnutls28-dev \
    libjavascript-minifier-xs-perl \
    libjson-glib-dev \
    libjson-perl \
    libkrb5-dev \
    libpam0g-dev \
    libpcp-import1-dev \
    libpcp-pmda3-dev \
    libpcp3-dev \
    libpolkit-agent-1-dev \
    libpolkit-gobject-1-dev \
    libssh-4-dbgsym \
    libssh-dev \
    libsystemd-dev \
    npm \
    nodejs:amd64 \
    pkg-config \
    pyflakes3 \
    python3 \
    python3-pep8 \
    sassc \
    ssh \
    strace \
    valgrind \
    xmlto \
    xsltproc \
"

tee /entrypoint <<EOF
#!/bin/sh -e

echo -n "Host: " && uname -srvm

. /usr/lib/os-release
echo -n "Container: \${NAME} \${VERSION} / " && ${personality} uname -nrvm
echo

set -ex
exec ${personality} -- "\$@"
EOF
chmod +x /entrypoint

echo "deb http://deb.debian.org/debian-debug/ stable-debug main" > /etc/apt/sources.list.d/ddebs.list
# always install amd64 nodejs version; there is e.g. no i386 version for node-sass available
dpkg --add-architecture amd64
apt-get update
apt-get install -y --no-install-recommends eatmydata
DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -y --no-install-recommends ${dependencies}

adduser --system --gecos "Builder" builder

# minimize image
rm -rf /var/cache/apt /var/lib/apt /var/log/*<commit_msg>containers: Drop documentation and some unneeded packages from unit-tests container<commit_after>#!/bin/sh -ex

personality="$1"

dependencies="\
    appstream-util \
    autoconf \
    automake \
    build-essential \
    chromium \
    clang \
    curl \
    dbus \
    gcc-multilib \
    gdb \
    git \
    glib-networking \
    glib-networking-dbgsym\
    gtk-doc-tools \
    gettext \
    libc6-dbg \
    libfontconfig1 \
    libglib2.0-0-dbgsym \
    libglib2.0-dev \
    libgnutls28-dev \
    libjavascript-minifier-xs-perl \
    libjson-glib-dev \
    libjson-perl \
    libkrb5-dev \
    libpam0g-dev \
    libpcp-import1-dev \
    libpcp-pmda3-dev \
    libpcp3-dev \
    libpolkit-agent-1-dev \
    libpolkit-gobject-1-dev \
    libssh-4-dbgsym \
    libssh-dev \
    libsystemd-dev \
    npm \
    nodejs:amd64 \
    pkg-config \
    pyflakes3 \
    python3 \
    python3-pep8 \
    sassc \
    ssh \
    strace \
    valgrind \
    xmlto \
    xsltproc \
"

tee /entrypoint <<EOF
#!/bin/sh -e

echo -n "Host: " && uname -srvm

. /usr/lib/os-release
echo -n "Container: \${NAME} \${VERSION} / " && ${personality} uname -nrvm
echo

set -ex
exec ${personality} -- "\$@"
EOF
chmod +x /entrypoint

echo "deb http://deb.debian.org/debian-debug/ stable-debug main" > /etc/apt/sources.list.d/ddebs.list
# always install amd64 nodejs version; there is e.g. no i386 version for node-sass available
dpkg --add-architecture amd64
apt-get update
apt-get install -y --no-install-recommends eatmydata
DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -y --no-install-recommends ${dependencies}

adduser --system --gecos "Builder" builder

# minimize image
# useful command: dpkg-query --show -f '${package} ${installed-size}\n' | sort -k2n
dpkg -P --force-depends libgl1-mesa-dri libglx-mesa0 perl

rm -rf /var/cache/apt /var/lib/apt /var/log/* /usr/share/doc/ /usr/share/man/ /usr/share/help /usr/share/info
{'fraction_non_alphanumeric': 0.13320191495353423, 'fraction_numerical': 0.018304702900591382, 'mean_word_length': 2.179946284691137, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6176199', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1377, 'n_words': 279}