Browse Source

- changed to a smaller OS footprint (VMware's Photon OS)

- simplified Dockerfile definition
- explicitly exposed the port
bubble
Roman Tarnavski 8 years ago
parent
commit
2c7cad3f47
2 changed files with 10 additions and 12 deletions
  1. +8
    -10
      Dockerfile
  2. +2
    -2
      README.md

+ 8
- 10
Dockerfile View File

@@ -7,16 +7,14 @@
#
###

FROM ubuntu:14.04
MAINTAINER dnephin@gmail.com
FROM vmware/node:4.2.4

ENV DEBIAN_FRONTEND noninteractive
WORKDIR /build

RUN apt-get update && apt-get install -y git npm nodejs openjdk-7-jre
RUN ln -s /usr/bin/nodejs /usr/local/bin/node
COPY . /build

WORKDIR /build
ADD package.json /build/package.json
RUN npm install
ADD . /build
CMD ./node_modules/gulp/bin/gulp.js serve
RUN npm install
EXPOSE 8080
CMD /build/node_modules/gulp/bin/gulp.js serve

+ 2
- 2
README.md View File

@@ -55,10 +55,10 @@ To build swagger-ui using a docker container:

```
docker build -t swagger-ui-builder .
docker run -p 127.0.0.1:8080:8080 swagger-ui-builder
docker run -p 80:8080 swagger-ui-builder
```

This will start Swagger UI at `http://localhost:8080`.
This will start Swagger UI at `http://localhost`.

### Use
Once you open the Swagger UI, it will load the [Swagger Petstore](http://petstore.swagger.io/v2/swagger.json) service and show its APIs. You can enter your own server url and click explore to view the API.


Loading…
Cancel
Save