code: def build_docker_run(ctx, image):
      
      if image not in DOCKER_RUN_IMGS:
          print('Error: unknown docker image "{0}"!'.format(image), file=sys.stderr)
          sys.exit(1)
  
      # Build the RPM & deb
      if image in ('centos6', 'centos7'):
          build_rpm(ctx, target=image)
      elif image in ('ubuntu-trusty',):
          # TODO: add ubuntu-trusty
          build_deb(ctx, target=image)
  
      dinfo = DOCKER_RUN_IMGS[image]
      dinfo_work_dir = os.path.join(dinfo['path'], '_work')
      ctx.run('mkdir -p {0}'.format(dinfo_work_dir))
      ctx.run('cp {0} {1}'.format(os.path.join(DIST_DIR, 'mssh-copy-id-*.rpm'), dinfo_work_dir))
      ctx.run('docker rmi -f {0}'.format(dinfo['name']), warn=True)
      ctx.run('docker build -t {0} {1}'.format(dinfo['name'], dinfo['path']))
docs: build docker images to run mssh-copy-id (functional test)