diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..8cfdf4bb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +node_modules +bower_components +*.swp diff --git a/Dockerfile b/Dockerfile index 22f42baa..05e9d50b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,6 @@ WORKDIR /build ADD package.json /build/package.json RUN npm install ADD . /build -CMD PATH=$PATH:node_modules/.bin cake dist \ No newline at end of file +CMD PATH=$PATH:node_modules/.bin cake dist +======= +CMD PATH=$PATH:node_modules/.bin cake dist diff --git a/README.md b/README.md index 75424ac4..8abe8681 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,15 @@ docker build -t swagger-ui-builder . docker run -v $PWD/dist:/build/dist swagger-ui-builder ``` +### Build using Docker + +To build swagger-ui using a docker container: + +``` +docker build -t swagger-ui-builder . +docker run -v $PWD/dist:/build/dist swagger-ui-builder +``` + ### Use Once you open the Swagger UI, it will load the [Swagger Petstore](http://petstore.swagger.wordnik.com/api/api-docs) service and show its APIs. You can enter your own server url and click explore to view the API.