<commit_before>FROM alpine:3.3

ENV FIREFOX_VERSION="38.3.0" \
    FIREFOX_ADDONS_URL="https://addons.mozilla.org/firefox/downloads/latest" \
    EXT_UID="207605"

WORKDIR /scratch

# Install required software and font packages
 RUN apk add --update bash curl xvfb dbus-x11 libcanberra-gtk2 firefox=${FIREFOX_VERSION}-r1 && \
     export TTFS=$(apk search -q ttf- | grep -v '\-doc') && \
     export FONTS=$(apk search -q font- | grep -v '\-doc') && \
     apk add ${TTFS} ${FONTS} && \
     rm -rf /var/cache/apk/*

# Install tabrotating plugin
RUN curl -LO $FIREFOX_ADDONS_URL/$EXT_UID/addon-${EXT_UID}-latest.xpi && \
    unzip addon-${EXT_UID}-latest.xpi && \
    rm addon-${EXT_UID}-latest.xpi && \
    export EXT_ID=$(cat install.rdf | grep "<em:id>" | head -n 1 | sed 's/^.*>\(.*\)<.*$/\1/g') && \
    export EXT_DIR="/usr/lib/firefox-${FIREFOX_VERSION}/browser/extensions/${EXT_ID}" && \
    export EXT_PATH="Extension0=${EXT_DIR}^M" && \
    mkdir ${EXT_DIR} && mv * ${EXT_DIR}

# Setup Firefox user profile
COPY assets/prefs.js /usr/lib/firefox-38.3.0/browser/extensions/tabrotator@davidfichtmueller.de/defaults/preferences/prefs.js
COPY assets/mozilla/firefox /root/.mozilla/firefox/
COPY assets/urls.txt /assets/urls.txt

ENTRYPOINT exec firefox $(cat /assets/urls.txt)<commit_msg>Removed xvfb package<commit_after>FROM alpine:3.3

ENV FIREFOX_VERSION="38.3.0" \
    FIREFOX_ADDONS_URL="https://addons.mozilla.org/firefox/downloads/latest" \
    EXT_UID="207605"

WORKDIR /scratch

# Install required software and font packages
 RUN apk add --update bash curl dbus-x11 libcanberra-gtk2 firefox=${FIREFOX_VERSION}-r1 && \
     export TTFS=$(apk search -q ttf- | grep -v '\-doc') && \
     export FONTS=$(apk search -q font- | grep -v '\-doc') && \
     apk add ${TTFS} ${FONTS} && \
     rm -rf /var/cache/apk/*

# Install tabrotating plugin
RUN curl -LO $FIREFOX_ADDONS_URL/$EXT_UID/addon-${EXT_UID}-latest.xpi && \
    unzip addon-${EXT_UID}-latest.xpi && \
    rm addon-${EXT_UID}-latest.xpi && \
    export EXT_ID=$(cat install.rdf | grep "<em:id>" | head -n 1 | sed 's/^.*>\(.*\)<.*$/\1/g') && \
    export EXT_DIR="/usr/lib/firefox-${FIREFOX_VERSION}/browser/extensions/${EXT_ID}" && \
    export EXT_PATH="Extension0=${EXT_DIR}^M" && \
    mkdir ${EXT_DIR} && mv * ${EXT_DIR}

# Setup Firefox user profile
COPY assets/prefs.js /usr/lib/firefox-38.3.0/browser/extensions/tabrotator@davidfichtmueller.de/defaults/preferences/prefs.js
COPY assets/mozilla/firefox /root/.mozilla/firefox/
COPY assets/urls.txt /assets/urls.txt

ENTRYPOINT exec firefox $(cat /assets/urls.txt)
{'fraction_non_alphanumeric': 0.1777434312210201, 'fraction_numerical': 0.01777434312210201, 'mean_word_length': 3.4792387543252596, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '161560', 'n_tokens_mistral': 1047, 'n_tokens_neox': 985, 'n_words': 188}