<commit_before>FROM ubuntu:latest
MAINTAINER <NAME> <<EMAIL>>

# Install a few dependencies
RUN apt-get update && \
  DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-client vim git build-essential ctags

# My tmux plugins (which make my config less insane) require tmux 1.9, so....
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python-software-properties software-properties-common && \
  add-apt-repository -y ppa:pi-rho/dev && \
  apt-get update && \
  apt-get install -y tmux=1.9a-1~ppa1~t

# Set up for pairing with wemux. 
RUN sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux && \
  sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux && \
  sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf && \
  echo "host_list=(root)" >> /usr/local/etc/wemux.conf

# Set up The Editor of the Gods
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ruby
RUN gem install homesick --no-rdoc --no-ri
RUN homesick clone dpetersen/vimfiles
RUN homesick symlink vimfiles

# Set up shell
RUN homesick clone dpetersen/zshfiles
RUN homesick symlink zshfiles
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y zsh
RUN chsh -s /usr/bin/zsh root

# Install a couple of helpful utilities
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ack-grep
RUN gem install git-duet --no-rdoc --no-ri
ADD https://github.com/zimbatm/direnv/releases/download/v2.5.0/direnv.linux-amd64 /usr/local/bin/direnv
RUN chmod 755 /usr/local/bin/direnv

# Set up SSH. We copy in some known good keys (not exactly helping the
# reusability of this image, but greatly helping me get up and running
# quickly...), and setting up SSH forwarding so that transactions like git pushes
# from the container happen magically.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server && \
  mkdir /var/run/sshd && \
  echo "AllowAgentForwarding yes" >> /etc/ssh/sshd_config
ADD authorized_keys /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/authorized_keys

# Fix for occasional errors in perl stuff (git, ack) saying that locale vars
# aren't set.
RUN locale-gen en_US en_US.UTF-8 && dpkg-reconfigure locales

# Expose the SSH port, and run the SSH server by default when this image is
# daemonized.
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]<commit_msg>Move to a single big layer.<commit_after>FROM ubuntu:latest
MAINTAINER <NAME> <<EMAIL>>

# Direnv install
ADD https://github.com/zimbatm/direnv/releases/download/v2.5.0/direnv.linux-amd64 /usr/local/bin/direnv
ADD authorized_keys /root/.ssh/authorized_keys

# Start by changing the apt output, as stolen from Discourse's Dockerfiles.
RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\
    # Probably a good idea
    apt-get update &&\

    # Basic dev tools
    apt-get install -y openssh-client git build-essential vim ctags &&\

    # My tmux plugins (which make my config less insane) require tmux 1.9, so....
    apt-get install -y python-software-properties software-properties-common &&\
    add-apt-repository -y ppa:pi-rho/dev &&\
    # Update required because of the added PPA!
    apt-get update &&\
    apt-get install -y tmux=1.9a-1~ppa1~t &&\

    # Set up for pairing with wemux.
    git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux &&\
    ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux &&\
    cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf &&\
    echo "host_list=(root)" >> /usr/local/etc/wemux.conf &&\

    # Set up The Editor of the Gods
    apt-get install -y ruby &&\
    gem install homesick --no-rdoc --no-ri &&\
    homesick clone dpetersen/vimfiles &&\
    homesick symlink vimfiles &&\
    
    # Set up shell
    homesick clone dpetersen/zshfiles &&\
    homesick symlink zshfiles &&\
    apt-get install -y zsh &&\
    chsh -s /usr/bin/zsh root &&\

    # Install a couple of helpful utilities
    apt-get install -y ack-grep &&\
    gem install git-duet --no-rdoc --no-ri &&\
    chmod 755 /usr/local/bin/direnv &&\

    # Set up SSH. We copy in some known good keys (not exactly helping the
    # reusability of this image, but greatly helping me get up and running
    # quickly...), and setting up SSH forwarding so that transactions like git pushes
    # from the container happen magically.
    apt-get install -y openssh-server &&\
    mkdir /var/run/sshd &&\
    echo "AllowAgentForwarding yes" >> /etc/ssh/sshd_config &&\
    chmod 600 /root/.ssh/authorized_keys &&\

    # Fix for occasional errors in perl stuff (git, ack) saying that locale vars
    # aren't set.
    locale-gen en_US en_US.UTF-8 && dpkg-reconfigure locales

# Expose the SSH port, and run the SSH server by default when this image is
# daemonized.
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
{'fraction_non_alphanumeric': 0.1121573550952082, 'fraction_numerical': 0.008369951872776732, 'mean_word_length': 3.2526690391459074, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '2386834', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1624, 'n_words': 512}