简体   繁体   中英

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

I installed apigee-127 in a Docker-Container on my Local machine. After that I run this Docker-Container and created a project with

a127 project create hello-world

To start this project

a127 project start

The Respone from this is that the Project ist started und u can enter it in your browser with your localhost and the Port thats given or in the same Docker-Container with the curl command

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

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

Most a127 commands seem to work fine. Now I would like to use the swagger-editor to edit my project, but there doesn't seem to be an option to edit the project remotely on my Docker-Container without an browser.

a127 project edit

The Answer is:

Starting Swagger editor.

Opening browser to: http://localhost:36070/#/edit

{ [Error: Command failed: xdg-open: no method available for opening ' http://localhost:36070/#/edit ' ] killed: false, code: 3, signal: null }

  • My first issue is that i have no chance to start a browser inside my Docker-Container -> its a webserver without GUI or Browser.

I wanted to start my swagger-editor outside the Container on my local machine but I had no idea to get into it.

  • Maybe someone can help me to get done with this problem?

I'm not using a127, but swagger project edit --help command output this.

-s do not open the browser

# 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM