code: def build_deb(ctx, target):
      
      if target not in ('ubuntu-trusty',):
          print('Error: unknown target "{0}"!'.format(target), file=sys.stderr)
          sys.exit(1)
  
      os.chdir(PROJECT_DIR)
      debbuild_dir = os.path.join(DIST_DIR, 'deb')
  
      # Create directories layout
      ctx.run('mkdir -p {0}'.format(debbuild_dir))
  
      # Copy the sources
      build_src(ctx, dest=debbuild_dir)
      src_archive = glob.glob(os.path.join(debbuild_dir, 'mssh-copy-id-*.tar.gz'))[0]
      ctx.run('tar -xvf {0} -C {1}'.format(src_archive, debbuild_dir))
      src_dir = src_archive[:-7]  # uncompressed directory
      ctx.run('cp -r {0} {1}'.format(os.path.join(PROJECT_DIR, 'deb/debian'), src_dir))
  
      # Build the deb
      ctx.run('docker run -e LOCAL_USER_ID={local_user_id} -v {local}:{cont} {img}'
              .format(local_user_id=os.getuid(),
                      local=debbuild_dir,
                      cont='/deb',
                      img=DOCKER_IMGS[target]['name']))
  
      ctx.run('mv -f {0} {1}'.format(os.path.join(debbuild_dir, 'mssh-copy-id_*.deb'), DIST_DIR))
docs: build a deb package