<commit_before>## -*- docker-image-name: "armbuild/ocs-distrib-archlinux:latest" -*-
FROM armbuild/archlinux-disk:2014-12-02
MAINTAINER Online Labs <<EMAIL>> (@online_en)


# Environment
ENV OCS_BASE_IMAGE armbuild/ocs-archlinux:2014-12-02


# Install packages
RUN pacman -Sy --noconfirm \
    bash-completion \
    cronie \
    curl \
    dhcpcd \
    file \
    htop \
    iptables \
    less \
    localepurge \
    lsb-release \
    man \
    mg \
    nano \
    nbd \
    networkmanager \
    ntp \
    openbsd-netcat \
    openssh \
    rsync \
    rsyslog \
    screen \
    socat \
    sudo \
    tmux \
    vim \
    wget


# xnbd-client
RUN mkdir /tmp/build-xnbd \
    && cd /tmp/build-xnbd \
    && wget https://bitbucket.org/hirofuchi/xnbd/downloads/xnbd-0.3.0.tar.bz2 -O xnbd.tar.bz2 \
    && tar -xf xnbd.tar.bz2 \
    && cd xnbd-* \
    && pacman -Sy --noconfirm gcc automake pkg-config make \
    && cd /tmp/build-xnbd/xnbd-* \
    && ./configure --prefix=/usr/local \
    && make -j4 \
    && make install \
    && pacman -R --noconfirm gcc automake pkg-config make \
    && cd / \
    && rm -rf /tmp/build-xnbd /tmp/xnbd.tar.bz2


# Locales
RUN sed -e s/^\#en_US.UTF-8/en_US.UTF-8/ -i /etc/locale.gen \
 && locale-gen


# Systemd
RUN systemctl disable getty@tty1.service \
 && systemctl disable systemd-networkd.service \
 && systemctl enable NetworkManager-wait-online.service \
 && systemctl enable serial-getty@ttyS0.service \
 && systemctl enable sshd.service \
 && systemctl enable NetworkManager \
 && systemctl enable ntpdate


# packages upgrade
RUN pacman --noconfirm -Suy


# Patch rootfs
RUN wget -qO - http://j.mp/ocs-scripts | bash
ADD ./patches/etc/ /etc/
ADD ./patches/usr/ /usr/


# Enable Online-Labs services
RUN systemctl enable oc-ssh-keys \
 && systemctl enable oc-add-extra-volumes \
 && systemctl enable oc-sync-kernel-modules


# Cleanup
RUN pacman-db-upgrade \
 && pacman -Rns linux-armv7 --noconfirm \
 && pacman -Sc --noconfirm \
 && rm -rf /var/cache/pacman/pkg \
 && localepurge-config && localepurge<commit_msg>Regenerating pacman database finally (#1)<commit_after>## -*- docker-image-name: "armbuild/ocs-distrib-archlinux:latest" -*-
FROM armbuild/archlinux-disk:2014-12-02
MAINTAINER Online Labs <<EMAIL>> (@online_en)


# Environment
ENV OCS_BASE_IMAGE armbuild/ocs-archlinux:2014-12-02


# Install packages
RUN pacman -Sy --noconfirm \
    bash-completion \
    cronie \
    curl \
    dhcpcd \
    file \
    htop \
    iptables \
    less \
    localepurge \
    lsb-release \
    man \
    mg \
    nano \
    nbd \
    networkmanager \
    ntp \
    openbsd-netcat \
    openssh \
    rsync \
    rsyslog \
    screen \
    socat \
    sudo \
    tmux \
    vim \
    wget


# xnbd-client
RUN mkdir /tmp/build-xnbd \
    && cd /tmp/build-xnbd \
    && wget https://bitbucket.org/hirofuchi/xnbd/downloads/xnbd-0.3.0.tar.bz2 -O xnbd.tar.bz2 \
    && tar -xf xnbd.tar.bz2 \
    && cd xnbd-* \
    && pacman -Sy --noconfirm gcc automake pkg-config make \
    && cd /tmp/build-xnbd/xnbd-* \
    && ./configure --prefix=/usr/local \
    && make -j4 \
    && make install \
    && pacman -R --noconfirm gcc automake pkg-config make \
    && cd / \
    && rm -rf /tmp/build-xnbd /tmp/xnbd.tar.bz2


# Locales
RUN sed -e s/^\#en_US.UTF-8/en_US.UTF-8/ -i /etc/locale.gen \
 && locale-gen


# Systemd
RUN systemctl disable getty@tty1.service \
 && systemctl disable systemd-networkd.service \
 && systemctl enable NetworkManager-wait-online.service \
 && systemctl enable serial-getty@ttyS0.service \
 && systemctl enable sshd.service \
 && systemctl enable NetworkManager \
 && systemctl enable ntpdate


# packages upgrade
RUN pacman --noconfirm -Suy


# Patch rootfs
RUN wget -qO - http://j.mp/ocs-scripts | bash
ADD ./patches/etc/ /etc/
ADD ./patches/usr/ /usr/


# Enable Online-Labs services
RUN systemctl enable oc-ssh-keys \
 && systemctl enable oc-add-extra-volumes \
 && systemctl enable oc-sync-kernel-modules


# Cleanup
RUN pacman-db-upgrade \
 && pacman -Rns linux-armv7 --noconfirm \
 && pacman -Sc --noconfirm \
 && rm -rf /var/cache/pacman/pkg \
 && localepurge-config && localepurge \
 && pacman-db-upgrade
{'fraction_non_alphanumeric': 0.1405275779376499, 'fraction_numerical': 0.014148681055155876, 'mean_word_length': 2.2433903576982894, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4953028', 'n_tokens_mistral': 1667, 'n_tokens_neox': 1549, 'n_words': 336}