Add current documentation tooling

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2015-05-12 02:11:48 +00:00
parent 8cd92eadf6
commit aef4c6b11c
8 changed files with 71 additions and 24 deletions

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
.PHONY: docs docs-shell docs-build
# import the existing docs build cmds from docker/docker
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
DOCSPORT := 8000
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
DOCKER_DOCS_IMAGE := kitematic-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT)
docs: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
docs-shell: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
docs-build:
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .

17
docs/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM docs/base:latest
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
# to get the git info for this repo
COPY . /src
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
#RUN git reset --hard
RUN grep '"version"' /src/package.json | sed 's/.*"version": "\(.*\)".*/\1/' > /docs/VERSION
COPY docs/* /docs/sources/kitematic/
# sadly, COPY is only recursive if you don't also need to name the destination
COPY docs/assets/ /docs/sources/kitematic/assets/
COPY docs/mkdocs.yml /docs/mkdocs-dhe.yml
# Then build everything together, ready for mkdocs
RUN /docs/build.sh

View File

@ -22,11 +22,11 @@ You install Kitematic much the same way you install any application on a Mac or
Opening Kitematic for the first time sets up everything you need to run Docker containers. If you don't already have VirtualBox installed, Kitematic will download and install the latest version.
![Installing](/assets/installing.png)
![Installing](assets/installing.png)
All Done! Within a minute you should be ready to start running your first container!
![containers](/assets/containers.png)
![containers](assets/containers.png)
### Technical Details

View File

@ -10,10 +10,10 @@ page_keywords: docker, documentation, about, technology, kitematic, gui, volumes
Every container created through Kitematic automatically has its volumes exposed on your Mac, which means you can manage files in volumes via the Finder. Kitematic exposes a container's volume data under `~/Kitematic/<container's name>/`. Quick access to this folder (or directory) is available via the app:
![Accessing the volumes directory](/assets/volumes-dir.png)
![Accessing the volumes directory](assets/volumes-dir.png)
### Changing Volume Directories
Let's say you have an Nginx webserver running via Kitematic (using the `kitematic/hello-world-nginx` image on DockerHub). However, you don't want to use the default directory created for the website_files volume. Instead, you already have the HTML, Javascript, and CSS for your website under `~/workspace/website`. Kitematic makes it easy to change the container's volume to read from this directory instead of the default one created by Kitematic:
![screen shot 2015-02-28 at 2 48 01 pm](/assets/change-folder.png)
![screen shot 2015-02-28 at 2 48 01 pm](assets/change-folder.png)

View File

@ -11,25 +11,25 @@ This is a quick tutorial demonstrating how to set up a local Minecraft server us
Create a container from the recommended Minecraft image by clicking the "Create" button.
![create Minecraft container](/assets/minecrafte-create.png)
![create Minecraft container](assets/minecrafte-create.png)
After the image finishes downloading, youll see the home screen for the Minecraft container. Your Minecraft server is now up and running inside a Docker container. Note that weve marked the IP and port you can use to connect to your Minecraft server in red (your IP and port may be different from what's shown).
![Minecraft server port and IP info](/assets/minecraft-port.png)
![Minecraft server port and IP info](assets/minecraft-port.png)
### Connect to Minecraft server
Open your Minecraft client, log in with your Minecraft account and click on the "Multiplayer" button.
![Minecraft login screen](/assets/minecraft-login.png)
![Minecraft login screen](assets/minecraft-login.png)
Click the "Add Server" button to add the Minecraft server you want to connect to.
![Add server]/assets/minecraft-login.png)
![Add server]assets/minecraft-login.png)
Fill in the "Server Address" text box with the marked IP and port from Kitematic you saw earlier.
![Minecraft server address](/assets/minecraft-server-address.png)
![Minecraft server address](assets/minecraft-server-address.png)
Click on the play button to connect to your Minecraft server and enjoy!
@ -38,15 +38,15 @@ Click on the play button to connect to your Minecraft server and enjoy!
Open the "data" folder from Kitematic. We use Docker Volume to map the folder from the Minecraft Docker container onto your computer.
![Minecraft data volume](/assets/minecraft-data-volume.png)
![Minecraft data volume](assets/minecraft-data-volume.png)
The Finder will open, allowing you to replace your current map with the new one you desire.
![Minecraft maps](/assets/minecraft-map.png)
![Minecraft maps](assets/minecraft-map.png)
Restart your container by clicking the "Restart" button.
![Restart Minecraft container](/assets/minecraft-restart.png)
![Restart Minecraft container](assets/minecraft-restart.png)
Go back to your Minecraft client and join your server. The new map should load.

13
docs/mkdocs.yml Normal file
View File

@ -0,0 +1,13 @@
# Kitematic
- ['kitematic/index.md', 'User Guide', 'Kitematic']
- ['kitematic/managing-volumes.md', 'User Guide', '&nbsp;&nbsp;Managing Volumes']
- ['kitematic/using-docker-cli.md', 'User Guide', '&nbsp;&nbsp;Using the Docker commandline']
- ['kitematic/minecraft-server.md', 'Examples', 'Kitematic: Minecraft server']
- ['kitematic/nginx-web-server.md', 'Examples', 'Kitematic: Ngnix web server']
- ['kitematic/rethinkdb-dev-database.md', 'Examples', 'Kitematic: Rethingdb development database']
- ['kitematic/faq.md', 'Reference', 'Kitematic: FAQ']
- ['kitematic/known-issues.md', 'Reference', 'Kitematic: Known issues']

View File

@ -12,21 +12,21 @@ In this tutorial, you will:
In this example website we'll be serving the popular 2048 game, as shown below. Let's get to it!
![2048 game](/assets/nginx-2048.png)
![2048 game](assets/nginx-2048.png)
#### Running the Nginx Web Server Container
First, if you haven't yet done so, [download and start Kitematic](https://kitematic.com/download) . Once installed and running, the app should look like this:
![Nginx create](/assets/nginx-create.png)
![Nginx create](assets/nginx-create.png)
Click on the _Create_ button of the `hello-world-nginx` listing as shown above. This will download and run a tiny Nginx web server in a container via Kitematic, allowing you to serve website data on your Mac.
![download Nginx hello world](/assets/nginx-hello-world.png)
![download Nginx hello world](assets/nginx-hello-world.png)
Once it's done downloading you should see a quick preview of the example website that comes with the container, as shown below. Click on the preview to see the result in your own browser.
![Nginx preview](/assets/nginx-preview.png)
![Nginx preview](assets/nginx-preview.png)
**What just happened?** Kitematic downloaded the `kitematic/hello-world-nginx` image from the Docker Hub and then created and ran a Docker Nginx container from this image.
@ -34,21 +34,21 @@ Once it's done downloading you should see a quick preview of the example website
This container exposes website data via a _Docker volume_. Kitematic makes managing Docker volumes easy - you can edit the data in Finder or with your favorite text editor. By default, Kitematic places volumes under `~/Kitematic` but you can change this in the container settings. To access the files via finder, click on the in-app folder icon for a container:
![Nginx data volume](/assets/nginx-data-volume.png)
![Nginx data volume](assets/nginx-data-volume.png)
A Finder window of the folder should open containing the index.html file we see being served by the container.
![Nginx data folder](/assets/nginx-data-folder.png)
![Nginx data folder](assets/nginx-data-folder.png)
#### Serving Your Own Website Data
Now let's try serving a more interesting website. [Download the zipped files](https://github.com/gabrielecirulli/2048/archive/master.zip) for 2048, a popular (and addictive) web-based tile game. Extract this zip file into the folder you just opened:
![Website files for 2048](/assets/nginx-2048-files.png)
![Website files for 2048](assets/nginx-2048-files.png)
Switch back to Kitematic and restart the container by clicking the "Restart" button as shown below. Your Nginx container should now be serving 2048.
![Nginx running 2048](/assets/nginx-serving-2048.png)
![Nginx running 2048](assets/nginx-serving-2048.png)
**What just happened?**
Kitematic automatically reveals Docker container volumes via directories on your Mac. In this case you changed the container's volume data via the Finder to serve a website we downloaded.

View File

@ -16,15 +16,15 @@ In this tutorial, you will:
First, if you haven't yet done so, [download and start Kitematic](https://kitematic.com/download). Once open, the app should look like this:
![Rethink create button](/assets/rethink-create.png)
![Rethink create button](assets/rethink-create.png)
Click on the _Create_ button of the `rethinkdb` image listing in the recommended list as shown above. This will download & run a RethinkDB container within a few minutes. Once it's done, you'll have a local RethinkDB database up and running.
![Rethink container](/assets/rethink-container.png)
![Rethink container](assets/rethink-container.png)
Let's start using it to develop a node.js app. For now, let's figure out which IP address and port RethinkDB is listening on. To find out, click the `Settings` tab and then the `Ports` section:
![Rethink create button](/assets/rethink-create.png)
![Rethink create button](assets/rethink-create.png)
You can see there that for RethinkDB port `28015`, the container is listening on host `192.168.99.100` and port `49154` (in this example - ports may be different for you). This means you can now reach RethinkDB via a client driver at `192.168.99.100:49154`. Again, this IP address may be different for you.
@ -43,5 +43,5 @@ Now, you'll create the RethinkDB example chat to test drive your new database. I
Now, point your browser to `http://localhost:8000`. Congratulations, you've successfully used a RethinkDB container in Kitematic to build a real-time chat app. Happy coding!
![Rethink app preview](/assets/rethink-preview.png)
![Rethink app preview](assets/rethink-preview.png)