From 4819c979451d1027b7f3a14b80fdba1d68d4baa1 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Thu, 17 Aug 2017 14:43:41 -0700 Subject: [PATCH] Add info on running a docs instance locally (#4207) --- README.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0856825e74..e52501e751 100644 --- a/README.md +++ b/README.md @@ -169,10 +169,28 @@ You have three options: You can continue working in a second terminal and Jekyll will rebuild the website incrementally. Refresh the browser to preview your changes. -3. Use Github Pages, with or without a local clone. Fork this repo in GitHub, - change your fork's repository name to `YOUR_GITHUB_USERNAME.github.io`, and - make changes to the Markdown files in your `master` branch. Browse to - https://\.github.io/ to preview the changes. +## Read these docs offline + +To read the docs offline, you can use either a standalone container or a swarm service. +To see all available tags, go to +[Docker Cloud](https://cloud.docker.com/app/docs/repository/docker/docs/docker.github.io/tags). +The following examples use the `latest` tag: + +- Run a single container: + + ```bash + docker run -it -p 4000:4000 docs/docker.github.io:latest + ``` + +- Run a swarm service: + + ```bash + docker service create -p 4000:4000 --name localdocs --replicas 1 docs/docker.github.io:latest + ``` + + This example uses only a single replica, but you could run as many replicas as you'd like. + +Either way, you can now access the docs at port 4000 on your Docker host. ## Important files