簡體   English   中英

如何在apigee127 Docker-Container上運行'swagger project edit'?

[英]How can I run 'swagger project edit' on apigee127 Docker-Container?

我在本地機器上的Docker-Container中安裝了apigee-127。 之后我運行這個Docker-Container並創建了一個項目

a127 project create hello-world

開始這個項目

a127 project start

對此的反應是項目啟動,你可以使用你的本地主機和給定的端口或使用curl命令在相同的Docker-Container中輸入它

docker: curl http://127.0.0.1:10010/hello?name=Scott

browser: http://localhost:32768/hello?name=Scott

大多數a127命令似乎工作正常。 現在我想使用swagger-editor來編輯我的項目,但似乎沒有選項可以在沒有瀏覽器的情況下在我的Docker-Container上遠程編輯項目。

a127 project edit

答案是:

啟動Swagger編輯器。

打開瀏覽器: http:// localhost:36070 /#/ edit

{[錯誤:命令失敗:xdg-open:沒有可用於打開' http:// localhost:36070 /#/ edit '的方法] kill :false,code:3,signal:null}

  • 我的第一個問題是我沒有機會在我的Docker-Container中啟動瀏覽器 - >它是一個沒有GUI或瀏覽器的網絡服務器。

我想在本地機器上的Container外面啟動我的swagger編輯器,但我不知道進入它。

  • 也許有人可以幫我解決這個問題?

我沒有使用a127,但是swagger project edit --help命令輸出這個。

-s不要打開瀏覽器

# swagger project edit --help

  Usage: edit [options] [directory]

  open Swagger editor for this project or the specified project directory

  Options:

    -h, --help         output usage information
    -s, --silent       do not open the browser
    --host       the hostname the editor is served from
    -p, --port   the port the editor is served from

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM