#!/bin/bash export DEBIAN_FRONTEND=noninteractive set -x exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1 PKGS=" apt-utils bash-completion bind9-host bonnie++ build-essential byobu command-not-found daemontools debmirror default-jre fonts-indic fonts-ipafont-gothic fonts-ipafont-mincho fortune git golang-go irssi jq ldap-auth-client ldap-utils libboost-all-dev libdb++-dev libnss-mdns libxml2 libxml2-dev libxslt1-dev lsof mailutils make man-db mosh mutt netcat-openbsd nmap nodejs npm nscd openssh-server pbzip2 pkg-config pv pwgen python python-dev python-pip python-software-properties rbenv rsync rsyslog rsyslog-gnutls rsyslog-relp runit screen snmp snmpd software-properties-common telnet texlive-latex-base tmux ttf-wqy-microhei ttf-wqy-zenhei vagrant vim wamerican-insane wget " apt-get update apt-get -y upgrade for PKG in $PKGS ; do apt-get install -y $PKG done # install docker apt-get install -y docker #apt-get install apt-transport-https ca-certificates #apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \ # --recv-keys 58118E89F3A912897C070ADBF76221572C52609D #echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > \ # /etc/apt/sources.list.d/docker.list #apt-get update #apt-get install docker-engine # install docker machine (this is gross): curl -L \ https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-`uname -s`-`uname -m` > \ /usr/local/bin/docker-machine && \ chmod +x /usr/local/bin/docker-machine # install docker compose (also gross): curl -L \ https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > \ /usr/local/bin/docker-compose && \ chmod +x /usr/local/bin/docker-compose # and completion curl -L \ https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > \ /etc/bash_completion.d/docker-compose # install neovim add-apt-repository ppa:neovim-ppa/unstable apt-get update apt-get install neovim # install ruby-build for rbenv install git clone https://github.com/rbenv/ruby-build.git /root/.rbenv/plugins/ruby-build # install some rbenv versions rbenv install 2.3.0 rbenv install jruby-9.0.5.0 # install some gems GEMS=" bundler " for GEM in $GEMS ; do gem install -V $GEM done # install ppss, paralell processing shell script cd /usr/local/bin wget https://raw.githubusercontent.com/sneak/ppss/master/ppss chmod +x ./ppss # update npm npm update -g --loglevel info npm # install some npm packages NPM_PKGS=" coffee-script coffeelint " for PKG in $NPM_PKGS ; do npm install -g --loglevel info $PKG done # upgrade pip and install bare essentials # update other packages as possible pip install --upgrade pip pip install setuptools pip install pip-review pip-review --verbose --auto # install other python packages PIP_PKGS=" virtualenv pylint awscli " for PKG in $PIP_PKGS; do pip install $PKG done # cleanup filesystem after build rm -rf \ /root/.cache \ /var/cache/* \ /var/lib/apt/lists/* \ /core