<commit_before>#!/bin/sh

#gen sshkey
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa

# Disable strict host checking
cat <<EOF > /root/.ssh/config
Host *
    StrictHostKeyChecking no
EOF

# Start container
docker run -d --name n1 -e ROOT_PASS="<PASSWORD>" -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" tutum/debian:jessie
N1_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' n1)

sleep 10

# Initial setup
ssh $N1_IP "rm /etc/apt/apt.conf.d/docker-clean && apt-get install sudo"

# Install JDK 8
ssh $N1_IP "echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | tee /etc/apt/sources.list.d/webupd8team-java.list"
ssh $N1_IP "echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | tee -a /etc/apt/sources.list.d/webupd8team-java.list"
ssh $N1_IP "echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections"
ssh $N1_IP "apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && apt-get update -y -q && apt-get install -qqy oracle-java8-installer oracle-java8-set-default"

# Install other dependencies and remove systemd
ssh $N1_IP "apt-get install -qqy git maven net-tools wget sysvinit-core sysvinit sysvinit-utils curl vim man faketime unzip iptables iputils-ping logrotate && apt-get remove -y --purge --auto-remove systemd" 

# Export the sub-container
docker export n1 > /root/jepsennode.tar
gzip /root/jepsennode.tar<commit_msg>Simplify nested container image - let jepsen's initial install do the heavy lifting<commit_after>#!/bin/sh

#gen sshkey
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa

# Disable strict host checking
cat <<EOF > /root/.ssh/config
Host *
    StrictHostKeyChecking no
EOF

# Start container
docker run -d --name n1 -e ROOT_PASS="<PASSWORD>" -e AUTHORIZED_KEYS="`cat ~/.ssh/id_rsa.pub`" tutum/debian:jessie
N1_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' n1)

sleep 10

# Initial setup
ssh $N1_IP "rm /etc/apt/apt.conf.d/docker-clean && apt-get update && apt-get install sudo net-tools wget sysvinit-core sysvinit sysvinit-utils curl vim man faketime unzip iptables iputils-ping logrotate && apt-get remove -y --purge --auto-remove systemd" 

# Export the sub-container
docker export n1 > /root/jepsennode.tar
gzip /root/jepsennode.tar
{'fraction_non_alphanumeric': 0.13156752062527138, 'fraction_numerical': 0.015631784628745114, 'mean_word_length': 4.03056768558952, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6485387', 'n_tokens_mistral': 915, 'n_tokens_neox': 841, 'n_words': 227}