Browse code

Update Dockerfile to use stackbrew/ubuntu (until it graduates), update Dockerfile MAINTAINER line, coalesce all apt-get installs into one invocation (including s3cmd by bringing in backports)

Tianon Gravi authored on 2013/12/25 12:40:41
Showing 1 changed files
... ...
@@ -24,59 +24,59 @@
24 24
 #
25 25
 
26 26
 docker-version	0.6.1
27
-FROM	ubuntu:12.04
28
-MAINTAINER	Solomon Hykes <solomon@dotcloud.com>
27
+FROM	stackbrew/ubuntu:12.04
28
+MAINTAINER	Tianon Gravi <admwiggin@gmail.com> (@tianon)
29 29
 
30
-# Prevent apt-get install from trying to prompt for stuff
31
-ENV	DEBIAN_FRONTEND noninteractive
30
+# Add precise-backports to get s3cmd >= 1.1.0 (so we get ENV variable support in our .s3cfg)
31
+RUN	echo 'deb http://archive.ubuntu.com/ubuntu precise-backports main universe' > /etc/apt/sources.list.d/backports.list
32 32
 
33
-# Build dependencies
34
-RUN	echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
35
-RUN	apt-get update
36
-RUN	apt-get install -y -q apt-utils
37
-RUN	apt-get install -y -q curl
38
-RUN	apt-get install -y -q git
39
-RUN	apt-get install -y -q mercurial
40
-RUN	apt-get install -y -q build-essential libsqlite3-dev
33
+# Packaged dependencies
34
+RUN	apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
35
+	apt-utils \
36
+	aufs-tools \
37
+	build-essential \
38
+	curl \
39
+	dpkg-sig \
40
+	git \
41
+	iptables \
42
+	libsqlite3-dev \
43
+	lxc \
44
+	mercurial \
45
+	reprepro \
46
+	ruby1.9.1 \
47
+	ruby1.9.1-dev \
48
+	s3cmd=1.1.0* \
49
+	--no-install-recommends
50
+
51
+# Get lvm2 source for compiling statically
52
+RUN	git clone https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2 && cd /usr/local/lvm2 && git checkout -q v2_02_103
53
+# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags
54
+# note: we can't use "git clone -b" above because it requires at least git 1.7.10 to be able to use that on a tag instead of a branch and we only have 1.7.9.5
55
+
56
+# Compile and install lvm2
57
+RUN	cd /usr/local/lvm2 && ./configure --enable-static_link && make device-mapper && make install_device-mapper
58
+# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
41 59
 
42 60
 # Install Go
43 61
 RUN	curl -s https://go.googlecode.com/files/go1.2.src.tar.gz | tar -v -C /usr/local -xz
44
-ENV	PATH	/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
62
+ENV	PATH	/usr/local/go/bin:$PATH
45 63
 ENV	GOPATH	/go:/go/src/github.com/dotcloud/docker/vendor
46 64
 RUN	cd /usr/local/go/src && ./make.bash --no-clean 2>&1
47 65
 
48
-# Cross compilation
66
+# Compile Go for cross compilation
49 67
 ENV	DOCKER_CROSSPLATFORMS	darwin/amd64 darwin/386
50 68
 # TODO add linux/386 and linux/arm
51 69
 RUN	cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done'
52 70
 
53
-# Ubuntu stuff
54
-RUN	apt-get install -y -q ruby1.9.3 rubygems libffi-dev
55
-RUN	gem install --no-rdoc --no-ri fpm
56
-RUN	apt-get install -y -q reprepro dpkg-sig
57
-
58
-RUN	apt-get install -y -q python-pip
59
-RUN	pip install s3cmd==1.1.0-beta3
60
-RUN	pip install python-magic==0.4.6
61
-RUN	/bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
62
-
63
-# Runtime dependencies
64
-RUN	apt-get install -y -q iptables
65
-RUN	apt-get install -y -q lxc
66
-RUN	apt-get install -y -q aufs-tools
67
-
68
-# Get lvm2 source for compiling statically
69
-RUN	git clone https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2 && cd /usr/local/lvm2 && git checkout v2_02_103
70
-# see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags
71
-# note: we can't use "git clone -b" above because it requires at least git 1.7.10 to be able to use that on a tag instead of a branch and we only have 1.7.9.5
72
-
73
-# Compile and install lvm2
74
-RUN	cd /usr/local/lvm2 && ./configure --enable-static_link && make device-mapper && make install_device-mapper
75
-# see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
76
-
77 71
 # Grab Go's cover tool for dead-simple code coverage testing
78 72
 RUN	go get code.google.com/p/go.tools/cmd/cover
79 73
 
74
+# TODO replace FPM with some very minimal debhelper stuff
75
+RUN	gem install --no-rdoc --no-ri fpm
76
+
77
+# Setup s3cmd config
78
+RUN	/bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY' > /.s3cfg
79
+
80 80
 VOLUME	/var/lib/docker
81 81
 WORKDIR	/go/src/github.com/dotcloud/docker
82 82