diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f365e051c..b7d23390ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,19 @@
+
+# [2.0.0-alpha.41](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.40...v2.0.0-alpha.41) (2018-10-18)
+
+
+### Bug Fixes
+
+* add null check in dispose method ([#675](https://github.com/Rebilly/ReDoc/issues/675)) ([6b7c5b7](https://github.com/Rebilly/ReDoc/commit/6b7c5b7))
+* extensionHook not being used ([a4a4013](https://github.com/Rebilly/ReDoc/commit/a4a4013)), closes [#665](https://github.com/Rebilly/ReDoc/issues/665)
+* fix issue with broken markdown caused by marked bug ([70cf293](https://github.com/Rebilly/ReDoc/commit/70cf293))
+
+### Peer dependencies updates
+
+* ReDoc now requires `styled-components@^4.0.1` to be installed if used as React component
+
+
+
# [2.0.0-alpha.40](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.39...v2.0.0-alpha.40) (2018-10-05)
diff --git a/README.md b/README.md
index 2037e46d31..56512906d0 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
[![Build Status](https://travis-ci.org/Rebilly/ReDoc.svg?branch=master)](https://travis-ci.org/Rebilly/ReDoc) [![Coverage Status](https://coveralls.io/repos/Rebilly/ReDoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Rebilly/ReDoc?branch=master) [![dependencies Status](https://david-dm.org/Rebilly/ReDoc/status.svg)](https://david-dm.org/Rebilly/ReDoc) [![devDependencies Status](https://david-dm.org/Rebilly/ReDoc/dev-status.svg)](https://david-dm.org/Rebilly/ReDoc#info=devDependencies) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Rebilly/ReDoc/blob/master/LICENSE)
- [![bundle size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc)
+ [![bundle size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
@@ -186,6 +186,17 @@ You can also specify `onLoaded` callback which will be called each time Redoc ha
/>
```
+## The Docker way
+
+ReDoc is available as pre-built Docker image in official [Docker Hub repository](https://hub.docker.com/r/redocly/redoc/). You may simply pull & run it:
+
+ docker pull redocly/redoc
+ docker run -p 80:8080 redocly/redoc
+
+Also you may rewrite some predefined environment variables defined in [Dockerfile](./Dockerfile). By default ReDoc starts with demo Petstore spec located at `http://petstore.swagger.io/v2/swagger.json`, but you may change this URL using environment variable `SPEC_URL`:
+
+ docker run -p 80:8080 -e SPEC_URL=https://api.example.com/openapi.json redocly/redoc
+
## ReDoc CLI
[See here](https://github.com/Rebilly/ReDoc/blob/master/cli/README.md)
diff --git a/cli/index.ts b/cli/index.ts
index 100ca856d9..1ae48241b1 100644
--- a/cli/index.ts
+++ b/cli/index.ts
@@ -5,7 +5,7 @@ import { renderToString } from 'react-dom/server';
import { ServerStyleSheet } from 'styled-components';
import { compile } from 'handlebars';
-import { createServer, ServerRequest, ServerResponse } from 'http';
+import { createServer, IncomingMessage, ServerResponse } from 'http';
import { dirname, join } from 'path';
import * as zlib from 'zlib';
@@ -258,7 +258,7 @@ async function getPageHTML(
// credits: https://stackoverflow.com/a/9238214/1749888
function respondWithGzip(
contents: string | ReadStream,
- request: ServerRequest,
+ request: IncomingMessage,
response: ServerResponse,
headers = {},
) {
diff --git a/src/services/AppStore.ts b/src/services/AppStore.ts
index 58d0b15f96..75fb64d95e 100644
--- a/src/services/AppStore.ts
+++ b/src/services/AppStore.ts
@@ -1,4 +1,4 @@
-import { observe } from 'mobx';
+import { Lambda, observe } from 'mobx';
import { OpenAPISpec } from '../types';
import { loadAndBundleSpec } from '../utils/loadAndBundleSpec';
@@ -58,7 +58,7 @@ export class AppStore {
marker = new MarkerService();
private scroll: ScrollService;
- private disposer;
+ private disposer: Lambda | null = null;
constructor(
spec: OpenAPISpec,
@@ -96,7 +96,9 @@ export class AppStore {
dispose() {
this.scroll.dispose();
this.menu.dispose();
- this.disposer();
+ if (this.disposer != null) {
+ this.disposer();
+ }
}
/**