Skip to content

Instantly share code, notes, and snippets.

@richp10
Created March 1, 2014 14:26
Show Gist options
  • Save richp10/9290480 to your computer and use it in GitHub Desktop.
Save richp10/9290480 to your computer and use it in GitHub Desktop.
Configure docker host
#!/bin/bash
# This configures the HOST machine that will run docker
# Note we need Ubuntu Raring 13.04 and Saucy 13.10 (64 bit) for the HOST
# See http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring-saucy
mkdir -p /src
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
apt-get -y update && apt-get -y upgrade
apt-get -y install linux-image-extra-`uname -r`
apt-get -y install software-properties-common git curl wget libxslt-dev libcurl4-openssl-dev \
libssl-dev libyaml-dev libtool libxml2-dev gawk runit git-core bsdtar aufs-tools lxc-docker \
autoconf build-essential gawk tar nano lynx monit strace autoconf patch bzip2 bison shorewall rinse
mkdir -p /data && cd /data && git clone https://smartrecovery@bitbucket.org/smartrecovery/docker.git
mkdir -p /data/shared/postgres/db
export CHOST="x86_64-pc-linux-gnu"
export CFLAGS="-march=native -O2 -pipe -Wall -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=native"
export CXXFLAGS="${CFLAGS}"
# Put back in below.. if it works.
echo 'export CHOST="x86_64-pc-linux-gnu" && export CFLAGS="-march=native -O2 -pipe -Wall -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=native"' >> /root/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment