Beispiel #1
0
	def create_from_image_id(cls, image_id, name=None):
		env = Environment(new=True)
		env._generate_ssh_keys()
		image = Image.findOne({"id": image_id})
		env.docker_id = virtualization.environments.create(image.docker_id, public_key=env.public_key)
		env.save()
		return env
Beispiel #2
0
def run(argv):
    image = Image.create_from_tar_stream(sys.stdin.buffer)
    print("IMAGE ID = %s" % image.id)
    print("DOCKER ID = %s" % image.docker_id)
    sys.exit(0)