Skip to content

Instantly share code, notes, and snippets.

@Jaykah
Last active August 29, 2015 14:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaykah/e0f8182710f1a21b5c99 to your computer and use it in GitHub Desktop.
Save Jaykah/e0f8182710f1a21b5c99 to your computer and use it in GitHub Desktop.
Docker 1.7 Dynamic
apt-get install -qy apt-transport-https pkg-config autoconf automake build-essential libdevmapper-dev golang-gosqlite-dev uuid-dev libattr1-dev zlib1g-dev libacl1-dev e2fslibs-dev libblkid-dev liblzo2-dev asciidoc xmlto --no-install-recommends
cd /opt
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/mason/btrfs-progs
cd btrfs-progs/
./autogen.sh
./configure
make
make install
apt-get remove -y golang golang-go
curl -sSL https://golang.org/dl/go1.4.2.linux-amd64.tar.gz | tar -C /usr/bin/ go/bin/ -xz --strip=2
curl -sSL https://golang.org/dl/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local/ -xz
cd /opt
git clone https://git@github.com/docker/docker
cd docker/
git branch release-v1.7.0
git checkout release-v1.7.0
git checkout v1.7.0
AUTO_GOPATH=1 ./hack/make.sh dynbinary
cd /opt/docker/bundles/1.7.0/dynbinary
install -m 755 -o root -g root docker-1.7.0 /usr/bin/docker-1.7.0
install -m 755 -o root -g root dockerinit-1.7.0 /usr/bin/dockerinit-1.7.0
cd /usr/bin/
ln -nsf docker-1.7.0 docker
ln -nsf dockerinit-1.7.0 dockerinit
@viranch
Copy link

viranch commented Jun 24, 2015

  • You don't really need to compile btrfs-progs, you can just install the btrfs-tools package. (This will also lead to lesser packages in the first step)
  • Don't manually remove /usr/bin/go, uninstall golang golang-go instead.
  • Short for installing go 1.4.2: curl -sSL https://golang.org/dl/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xz

@Jaykah
Copy link
Author

Jaykah commented Jun 24, 2015

Fixed, thanks.

As to btrfs, I compiled it to avoid some error I was having (don't recall it, unfortunately). Those are simply the commands I used to get up and running quickly.

@viranch
Copy link

viranch commented Jun 25, 2015

Also, sudo for make install and install commands :)

@Jaykah
Copy link
Author

Jaykah commented Jun 25, 2015

This is intended to be a script executed with proper privileges in unattended mode.

@viranch
Copy link

viranch commented Jun 30, 2015

You've used sudo in the first line so I got the impression that this will just be run as a normal user.

@Jaykah
Copy link
Author

Jaykah commented Jul 2, 2015

Btw

Short for installing go 1.4.2: curl -sSL https://golang.org/dl/go1.4.2.linux-amd64.tar.gz | tar -C /usr/local -xz

Is not working, have to cherry pick the dir and strip the structure to turn it into a step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment