2013-04-23 01:29:12 -04:00
|
|
|
# This will build a container capable of producing an official binary build of docker and
|
|
|
|
# uploading it to S3
|
2013-05-31 03:59:18 -04:00
|
|
|
from ubuntu:12.04
|
2013-05-02 01:05:36 -04:00
|
|
|
maintainer Solomon Hykes <solomon@dotcloud.com>
|
2013-05-31 03:59:18 -04:00
|
|
|
# Workaround the upstart issue
|
|
|
|
run dpkg-divert --local --rename --add /sbin/initctl
|
|
|
|
run ln -s /bin/true /sbin/initctl
|
|
|
|
# Enable universe and gophers PPA
|
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q python-software-properties
|
|
|
|
run add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
|
|
|
|
run add-apt-repository -y ppa:gophers/go/ubuntu
|
2013-04-23 01:29:12 -04:00
|
|
|
run apt-get update
|
2013-05-31 03:59:18 -04:00
|
|
|
# Packages required to checkout, build and upload docker
|
2013-04-24 01:57:34 -04:00
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q s3cmd
|
2013-05-02 08:27:37 -04:00
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q curl
|
2013-05-13 18:10:24 -04:00
|
|
|
run curl -s -o /go.tar.gz https://go.googlecode.com/files/go1.1.linux-amd64.tar.gz
|
2013-05-02 08:27:37 -04:00
|
|
|
run tar -C /usr/local -xzf /go.tar.gz
|
2013-05-31 03:59:18 -04:00
|
|
|
run echo "export PATH=/usr/local/go/bin:$PATH" > /.bashrc
|
|
|
|
run echo "export PATH=/usr/local/go/bin:$PATH" > /.bash_profile
|
2013-04-24 01:57:34 -04:00
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q git
|
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q build-essential
|
|
|
|
# Packages required to build an ubuntu package
|
2013-05-31 03:59:18 -04:00
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-stable
|
2013-04-24 01:57:34 -04:00
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q debhelper
|
|
|
|
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q autotools-dev
|
2013-05-02 22:22:41 -04:00
|
|
|
run apt-get install -y -q devscripts
|
2013-05-31 03:59:18 -04:00
|
|
|
# Copy dockerbuilder files into the container
|
|
|
|
add . /src
|
2013-05-02 01:56:51 -04:00
|
|
|
run cp /src/dockerbuilder /usr/local/bin/ && chmod +x /usr/local/bin/dockerbuilder
|
2013-05-02 01:05:36 -04:00
|
|
|
run cp /src/s3cfg /.s3cfg
|
2013-05-02 01:56:51 -04:00
|
|
|
cmd ["dockerbuilder"]
|