in Education by
So, I wanted to run the local Swagger UI with respect to Local Json. And for that I am following the instructions available here: Here is the command that is being shared in that documentation: docker run -p 8081:8080 -e SWAGGER_JSON=/foo/swagger.json -v /bar:/foo swaggerapi/swagger-ui Here I understand the -p option but this -e and -v is confusing. So let's assume I have kept a JSON file at my desktop in Mac whose path is : /Users/abc/Desktop/lp.json so with respect to this file the command will gets changed to: docker run -p 8081:8080 -e SWAGGER_JSON=/Users/abc/Desktop/lp.json -v /bar:/foo swaggerapi/swagger-ui But what about the -v part of the command. What is the value that I need to put with respect to -v option, although the basic command i.e : docker run -p 8081:8080 swaggerapi/swagger-ui Runs and SwaggerUI is available at http:localhost:8081 but with default Json and not with my Json, i.e with http://petstore.swagger.io/v2/swagger.json So my query is what should I make a change to the command of docker that will run the image of the SwaggerUI with my local JSON? Please help. Thanks in advance. & Happy coding :) JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
In the docker command -v means to mount a volume and -e means to add environment variables, so what you want is probbably this: docker run -p 8081:8080 -e SWAGGER_JSON=/mnt/lp.json -v /Users/abc/Desktop:/mnt swaggerapi/swagger-ui

Related questions

0 votes
    Can we use JSON instead of YAML while developing docker-compose file in Docker?...
asked Jun 21, 2021 in Technology by JackTerrance
0 votes
    So I am trying to build a docker image with the Golang SDK, everything runs except the section in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I've got a flow where I want a codepipeline to trigger on git commits on Github, go via some ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Running Docker containers can be checked by using___________. (1)docker ps (2)docker cs...
asked May 2, 2021 in Technology by JackTerrance
0 votes
    I'm working on a Spring application and I have some troubles with Swagger and Spring Security. I had ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I'm trying to teach myself about Docker and using the docker-compose.yml to play around with images and ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    What is docker image registry?...
asked Jun 18, 2021 in Insurance by JackTerrance
0 votes
    How can you define the Kibana Docker image?...
asked Jun 4, 2021 in Technology by JackTerrance
0 votes
    Can you define Kibana docker image?...
asked Jun 3, 2021 in Technology by JackTerrance
0 votes
    I want to encode an image into a string using the base64 module. I've ran into a problem though. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    I know when Cygwin installs there is a batch file that is used to launch it in Windows. But if I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    My code is about bookStore with list of books. I need to extract all data(books) from a JSON file and put them in a ... console.log(e); } } function bookToHTMLRow(book) { return `...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I have a JSON File with database environment configuration called env-config.json like this: { "LATEST":{ ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I have a json file contains a icons object like this: "icons" : { "logo" : "fa fa-caret-down ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    I'm completely new in logging but familiar in SQL queries. I'm now experimenting with Serilog and Seq. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
...