Adapt Dockerfile to run docker tests inside docker
This commit is contained in:
parent
3c80bd76cf
commit
34eab42833
2 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# This file describes the standard way to build Docker, using docker
|
||||
docker-version 0.4.2
|
||||
docker-version 0.6.1
|
||||
from ubuntu:12.04
|
||||
maintainer Solomon Hykes <solomon@dotcloud.com>
|
||||
# Build dependencies
|
||||
|
@ -23,6 +23,9 @@ run apt-get install -y -q python-pip
|
|||
run pip install s3cmd
|
||||
run pip install python-magic
|
||||
run /bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
|
||||
# Runtime dependencies
|
||||
run apt-get install -y -q iptables
|
||||
run apt-get install -y -q lxc
|
||||
# Download dependencies
|
||||
run PKG=github.com/kr/pty REV=27435c699; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
|
||||
run PKG=github.com/gorilla/context/ REV=708054d61e5; git clone http://$PKG /go/src/$PKG && cd /go/src/$PKG && git checkout -f $REV
|
||||
|
@ -32,6 +35,10 @@ run PKG=code.google.com/p/go.net/ REV=84a4013f96e0; hg clone http://$PKG /go/s
|
|||
# Upload docker source
|
||||
add . /go/src/github.com/dotcloud/docker
|
||||
run ln -s /go/src/github.com/dotcloud/docker /src
|
||||
volume /var/lib/docker
|
||||
# Build the binary
|
||||
run cd /go/src/github.com/dotcloud/docker && hack/release/make.sh
|
||||
workdir /go/src/github.com/dotcloud/docker
|
||||
# Wrap all commands in the "docker-in-docker" script to allow nested containers
|
||||
entrypoint ["hack/dind"]
|
||||
cmd cd /go/src/github.com/dotcloud/docker && hack/release/release.sh
|
||||
|
|
3
hack/dind
Normal file → Executable file
3
hack/dind
Normal file → Executable file
|
@ -53,4 +53,7 @@ do
|
|||
done
|
||||
popd
|
||||
|
||||
# Mount /tmp
|
||||
mount -t tmpfs none /tmp
|
||||
|
||||
exec $*
|
||||
|
|
Loading…
Add table
Reference in a new issue