<commit_before>FROM ubuntu:16.04

# Environment variables
ENV \
    LANG="en_US.UTF-8"

# Volume
VOLUME /var/lib/docker

# Workdir
WORKDIR /docker

# Entrypoint 
ENTRYPOINT [ "/usr/bin/build.sh" ]

# Copy root filesystem
COPY rootfs /

# Install base system
RUN \
    apt-get update \
    \
    && apt-get install -y --no-install-recommends \
        locales \
    \
    && locale-gen en_US.UTF-8 \
    \
    && apt-get install -y --no-install-recommends \
        apt-transport-https \
        ca-certificates \
        curl \
        git \
        iproute2 \
        jq \
        python3 \
        python3-pip \
        python3-setuptools \
        software-properties-common \
    \
    && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
    \
    && add-apt-repository \
        "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
    \
    && apt-get update \
    \
    && apt-get install -y --no-install-recommends \
        docker-ce \
        qemu-user-static \
        binfmt-support \
    \
    && pip3 install \
        docker-context-streamer \
        dockerfile2json \
    \
    && apt-get remove -y --purge \
        apt-transport-https \
        curl \
        python3-pip \
        software-properties-common \
    && chmod a+x /usr/bin/build.sh \
    && apt-get -y autoremove \
    && apt-get -y purge \
    && apt-get -y clean \
    && rm -rf /var/lib/{apt,dpkg,cache,log}/* \
    && rm -rf /var/{cache,log}/* \
    && rm -rf /usr/share/{doc,man}/*

# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION

# Labels
LABEL \
    maintainer="<NAME> <<EMAIL>>" \
    org.label-schema.description="Docker build environment for Community Hass.io Add-ons" \
    org.label-schema.build-date=${BUILD_DATE} \
    org.label-schema.name="Addon build environment" \
    org.label-schema.schema-version="1.0" \
    org.label-schema.url="http://addons.community" \
    org.label-schema.usage="https://github.com/hassio-addons/build-env/blob/master/README.md" \
    org.label-schema.vcs-ref=${BUILD_REF} \
    org.label-schema.vcs-url="https://github.com/hassio-addons/build-env" \
    org.label-schema.vendor="<NAME>" \
    org.label-schema.version=${BUILD_VERSION}
<commit_msg>:lipstick: Sets DEBIAN_FRONTEND to non-interactive for a cleaner build output<commit_after>FROM ubuntu:16.04

# Environment variables
ENV \
    LANG="en_US.UTF-8" \
    DEBIAN_FRONTEND="noninteractive"

# Volume
VOLUME /var/lib/docker

# Workdir
WORKDIR /docker

# Entrypoint 
ENTRYPOINT [ "/usr/bin/build.sh" ]

# Copy root filesystem
COPY rootfs /

# Install base system
RUN \
    apt-get update \
    \
    && apt-get install -y --no-install-recommends \
        locales \
    \
    && locale-gen en_US.UTF-8 \
    \
    && apt-get install -y --no-install-recommends \
        apt-transport-https \
        ca-certificates \
        curl \
        git \
        iproute2 \
        jq \
        python3 \
        python3-pip \
        python3-setuptools \
        software-properties-common \
    \
    && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
    \
    && add-apt-repository \
        "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
    \
    && apt-get update \
    \
    && apt-get install -y --no-install-recommends \
        docker-ce \
        qemu-user-static \
        binfmt-support \
    \
    && pip3 install \
        docker-context-streamer \
        dockerfile2json \
    \
    && apt-get remove -y --purge \
        apt-transport-https \
        curl \
        python3-pip \
        software-properties-common \
    && chmod a+x /usr/bin/build.sh \
    && apt-get -y autoremove \
    && apt-get -y purge \
    && apt-get -y clean \
    && rm -rf /var/lib/{apt,dpkg,cache,log}/* \
    && rm -rf /var/{cache,log}/* \
    && rm -rf /usr/share/{doc,man}/*

# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION

# Labels
LABEL \
    maintainer="<NAME> <<EMAIL>>" \
    org.label-schema.description="Docker build environment for Community Hass.io Add-ons" \
    org.label-schema.build-date=${BUILD_DATE} \
    org.label-schema.name="Addon build environment" \
    org.label-schema.schema-version="1.0" \
    org.label-schema.url="http://addons.community" \
    org.label-schema.usage="https://github.com/hassio-addons/build-env/blob/master/README.md" \
    org.label-schema.vcs-ref=${BUILD_REF} \
    org.label-schema.vcs-url="https://github.com/hassio-addons/build-env" \
    org.label-schema.vendor="<NAME>" \
    org.label-schema.version=${BUILD_VERSION}

{'fraction_non_alphanumeric': 0.14942528735632185, 'fraction_numerical': 0.007373671654738669, 'mean_word_length': 1.979328165374677, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5245600', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1609, 'n_words': 272}