Skip to content

Instantly share code, notes, and snippets.

@Jaykah
Last active August 29, 2015 14:23
Show Gist options
  • Save Jaykah/c2ea2bdad4f282c2e5ee to your computer and use it in GitHub Desktop.
Save Jaykah/c2ea2bdad4f282c2e5ee to your computer and use it in GitHub Desktop.
Docker 1.7 Dynamic Dockerfile
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -qy wget git 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
WORKDIR /opt
RUN git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/mason/btrfs-progs
WORKDIR /opt/btrfs-progs/
RUN ./autogen.sh && ./configure && make && make install
WORKDIR /opt
RUN wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz
RUN echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
RUN rm -rf /usr/bin/go && cp -rf /usr/local/go/bin/go /usr/bin/
WORKDIR /opt
RUN git clone https://[email protected]/docker/docker
WORKDIR /opt/docker/
RUN git branch release-v1.7.0 && git checkout release-v1.7.0 && git checkout v1.7.0
ENV AUTO_GOPATH=1
RUN ./hack/make.sh dynbinary
WORKDIR /opt/docker/bundles/1.7.0/dynbinary
RUN install -m 755 -o root -g root docker-1.7.0 /usr/bin/docker-1.7.0
RUN install -m 755 -o root -g root dockerinit-1.7.0 /usr/bin/dockerinit-1.7.0
WORKDIR /usr/bin
RUN ln -nsf docker-1.7.0 docker && ln -nsf dockerinit-1.7.0 dockerinit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment