开发者社区> 问答> 正文

灵雀云命令行(CLI)远程“docker exec”集成:报错 

[需求描述] 灵雀云(alauda.cn)是中国首家容器云平台(Container-as-a-Service),提供高效、高可用的容器托管服务,从云端与Docker技术对接,全面服务于容器化应用完整生命周期。

灵雀云提供一个命令行界面(CLI),目前开源在 https://github.com/alaudacloud/alauda-CLI。可以用类似 docker 的体验将容器化应用直接部署到云端,例如: $ alauda run hello index.alauda.cn/alauda/hello-world -p 80 以上命令会使用 index.alauda.cn/alauda/hello-world 镜像,部署并启动名为 hello 的服务,并暴露80端口。 CLI使用方法参考文档: http://docs.alauda.cn/cli/introduce.html

为了降低云端排错的难度,我们在最近上线了EXEC功能,与docker exec类似,可以远程对部署在灵雀云平台上的容器进行操作,或直接登录到容器内部,通过交互式操作查看容器状态,修改容器配置。

目前,我们在每个区域提供一个SSH代理服务作为EXEC的接入口。例如:如果用户 kaichen 使用之前命令行在灵雀云的北京一区创建了服务 hello,我们可以通过北京一区的SSH代理(exec.alauda.cn)访问该容器: $ ssh –p 4022 kaichen@exec.alauda.cn hello /bin/bash 输入密码后会在这个远程容器里打开一个shell,可进行交互操作。 EXEC功能细节参考博客:http://www.alauda.cn/2015/07/09/exec/ 

此悬赏项目就是要在灵雀云的CLI里集成EXEC功能,提供类似docker exec的体验: $ alauda exec hello /bin/bash

[功能描述] 完成以下命令实现: $ alauda [service] exec usage: alauda service exec [-h] [-n NAMESPACE] container command positional arguments:   container    Container instance name, in the form of <service name>.<container number>, where <container number> defaults to 0 if absent   command   Command to execute optional arguments:   -h, —help    show this help message and exit   -n, —namespace    Service namespace 提示: 容器所在区的SSH代理地址可通过以下API获取: GET /v1/services/(namespace)/(service_name)/

[如何参与] 1. 点击本页面的报名 2. 通过审查后fork项目 https://github.com/alaudacloud/alauda-CLI 3. 提交pull request 4. 提供文档Markdown,参考现有文档http://docs.alauda.cn/cli/introduce.html  4. 我们会有专人检查、测试pull request和文档,通过后付款

展开
收起
kun坤 2020-06-04 21:07:50 765 0
1 条回答
写回答
取消 提交回答
  • https://github.com/alaudacloud/alauda-CLI/pull/2 已完成 pull request######

    引用来自“李孟君”的评论

    https://github.com/alaudacloud/alauda-CLI/pull/2 已完成 pull request
    需要到解决方案里去提交哦######

    引用来自“李孟君”的评论

    https://github.com/alaudacloud/alauda-CLI/pull/2 已完成 pull request

    引用来自“红薯”的评论

    需要到解决方案里去提交哦
    谢谢提醒######大家动作真快啊!我们会在PR或私信里做意见反馈。:) 给众包平台点个赞!######有两个提交了,挺快的呀. 原来的代码竟然不带测试模块, 看来又有新需求了:)######我也能评论吗?######来来来,用Go语言啊~######

    引用来自“特价萝卜”的评论

    来来来,用Go语言啊~
    +1 用 go 重写一个######不是Nodejs写的,不开心。
    2020-06-05 22:33:45
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
阿里邮箱—安全高效集成 立即下载
集成智能接入网关APP:优化企业级移动办公网络 立即下载
云效助力企业集成安全到DevOps中 立即下载