mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge branch 'origin/new-dockerbuilder'
This commit is contained in:
commit
d6a63132ef
2 changed files with 14 additions and 8 deletions
|
@ -69,11 +69,14 @@ def insert(base, src, dst, author=None):
|
|||
stdin.seek(0)
|
||||
return run_and_commit(base, "cat > {0}; chmod +x {0}".format(dst), stdin=stdin, author=author)
|
||||
|
||||
def push(base, dst, author=None):
|
||||
def add(base, src, dst, author=None):
|
||||
print "PUSH to {} in {}".format(dst, base)
|
||||
if src == ".":
|
||||
tar = subprocess.Popen(["tar", "-c", "."], stdout=subprocess.PIPE).stdout
|
||||
else:
|
||||
tar = subprocess.Popen(["curl", src], stdout=subprocess.PIPE).stdout
|
||||
if dst == "":
|
||||
raise Exception("Missing argument to push")
|
||||
tar = subprocess.Popen(["tar", "-c", "."], stdout=subprocess.PIPE).stdout
|
||||
return run_and_commit(base, "mkdir -p '{0}' && tar -C '{0}' -x".format(dst), stdin=tar, author=author)
|
||||
|
||||
def main():
|
||||
|
@ -104,8 +107,9 @@ def main():
|
|||
steps.append(result)
|
||||
base = result
|
||||
print "===> " + base
|
||||
elif op == "push":
|
||||
result = push(base, param.strip(), author=maintainer)
|
||||
elif op == "add":
|
||||
src, dst = param.split(" ", 1)
|
||||
result = add(base, src, dst, author=maintainer)
|
||||
steps.append(result)
|
||||
base=result
|
||||
print "===> " + base
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# This will build a container capable of producing an official binary build of docker and
|
||||
# uploading it to S3
|
||||
maintainer Solomon Hykes <solomon@dotcloud.com>
|
||||
from ubuntu:12.10
|
||||
run apt-get update
|
||||
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q s3cmd
|
||||
|
@ -10,8 +11,9 @@ run DEBIAN_FRONTEND=noninteractive apt-get install -y -q build-essential
|
|||
# Packages required to build an ubuntu package
|
||||
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q debhelper
|
||||
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q autotools-dev
|
||||
copy fake_initctl /usr/local/bin/initctl
|
||||
add . /src
|
||||
run cp /src/dockerbuilder /usr/local/bin/ && chmod +x /usr/local/bin/dockerbuilder
|
||||
run cp /src/fake_initctl /usr/local/bin/initctl && chmod +x /usr/local/bin/initctl
|
||||
run cp /src/s3cfg /.s3cfg
|
||||
run DEBIAN_FRONTEND=noninteractive apt-get install -y -q devscripts
|
||||
copy dockerbuilder /usr/local/bin/dockerbuilder
|
||||
copy s3cfg /.s3cfg
|
||||
# run $img dockerbuilder $REVISION_OR_TAG $S3_ID $S3_KEY
|
||||
cmd ["dockerbuilder"]
|
||||
|
|
Loading…
Reference in a new issue