mirror of https://github.com/docker/docs.git
Add current documentation tooling
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
8cd92eadf6
commit
aef4c6b11c
|
@ -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 .
|
|
@ -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
|
|
@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
All Done! Within a minute you should be ready to start running your first container!
|
||||
|
||||

|
||||

|
||||
|
||||
### Technical Details
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||

|
||||

|
||||
|
||||
### 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:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
After the image finishes downloading, you’ll see the home screen for the Minecraft container. Your Minecraft server is now up and running inside a Docker container. Note that we’ve 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).
|
||||
|
||||

|
||||

|
||||
|
||||
### Connect to Minecraft server
|
||||
|
||||
Open your Minecraft client, log in with your Minecraft account and click on the "Multiplayer" button.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
The Finder will open, allowing you to replace your current map with the new one you desire.
|
||||
|
||||

|
||||

|
||||
|
||||
Restart your container by clicking the "Restart" button.
|
||||
|
||||

|
||||

|
||||
|
||||
Go back to your Minecraft client and join your server. The new map should load.
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
# Kitematic
|
||||
- ['kitematic/index.md', 'User Guide', 'Kitematic']
|
||||
- ['kitematic/managing-volumes.md', 'User Guide', ' Managing Volumes']
|
||||
- ['kitematic/using-docker-cli.md', 'User Guide', ' 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']
|
||||
|
|
@ -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!
|
||||
|
||||

|
||||

|
||||
|
||||
#### 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:
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
**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:
|
||||
|
||||

|
||||

|
||||
|
||||
A Finder window of the folder should open containing the index.html file we see being served by the container.
|
||||
|
||||

|
||||

|
||||
|
||||
#### 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:
|
||||
|
||||

|
||||

|
||||
|
||||
Switch back to Kitematic and restart the container by clicking the "Restart" button as shown below. Your Nginx container should now be serving 2048.
|
||||
|
||||

|
||||

|
||||
|
||||
**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.
|
||||
|
|
|
@ -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:
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||

|
||||
|
||||
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!
|
||||
|
||||

|
||||

|
||||
|
||||
|
|
Loading…
Reference in New Issue