Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/docs'
Browse files Browse the repository at this point in the history
  • Loading branch information
Solomon Hykes committed Mar 28, 2013
2 parents 9528b86 + 09e69e4 commit 47e5d2f
Show file tree
Hide file tree
Showing 37 changed files with 190 additions and 398 deletions.
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ clean:

docs:
-rm -rf $(BUILDDIR)/*
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/html
cp sources/index.html $(BUILDDIR)/html/
cp sources/gettingstarted.html $(BUILDDIR)/html/
cp -r sources/gettingstarted $(BUILDDIR)/html/
cp sources/dotcloud.yml $(BUILDDIR)/html/
cp sources/CNAME $(BUILDDIR)/html/
cp sources/.nojekyll $(BUILDDIR)/html/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 0 additions & 34 deletions docs/sources/documentation/examples/hello_world.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/sources/documentation/index.rst

This file was deleted.

54 changes: 0 additions & 54 deletions docs/sources/documentation/installation/amazon.rst

This file was deleted.

50 changes: 50 additions & 0 deletions docs/sources/examples/hello_world.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
:title: Hello world example
:description: A simple hello world example with Docker
:keywords: docker, example, hello world

.. _hello_world:

Hello World
===========
This is the most basic example available for using docker

This example assumes you have Docker installed.


Download the base container

.. code-block:: bash
# Download a base image
docker pull base
The *base* image is a minimal *ubuntu* based container, alternatively you can select *busybox*, a bare
minimal linux system. The images are retrieved from the docker repository.


.. code-block:: bash
#run a simple echo command, that will echo hello world back to the console over standard out.
docker run base /bin/echo hello world
**Explanation:**

- **"docker run"** run a command in a new container
- **"base"** is the image we want to run the command inside of.
- **"/bin/echo"** is the command we want to run in the container
- **"hello world"** is the input for the echo command



**Video:**

See the example in action

.. raw:: html

<div style="margin-top:10px;">
<iframe width="560" height="350" src="http://ascii.io/a/2603/raw" frameborder="0"></iframe>
</div>


Continue to the :ref:`hello_world_daemon` example.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ Hello World Daemon
==================
The most boring daemon ever written.

This example assumes you have Docker installed and with the busybox image already imported. We will use the busybox image to run a simple hello world daemon that will just print hello world to standard out every second. It will continue to do this until we stop it.
This example assumes you have Docker installed and with the base image already imported ``docker pull base``.
We will use the base image to run a simple hello world daemon that will just print hello world to standard
out every second. It will continue to do this until we stop it.

**Steps:**

.. code-block:: bash
$ CONTAINER_ID=$(docker run -d busybox /bin/sh -c "while true; do echo hello world; sleep 1; done")
$ CONTAINER_ID=$(docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done")
We are going to run a simple hello world daemon in a new container made from the busybox daemon.

- **"docker run -d "** run a command in a new container. We pass "-d" so it runs as a daemon.
- **"busybox"** is the image we want to run the command inside of.
- **"base"** is the image we want to run the command inside of.
- **"/bin/sh -c"** is the command we want to run in the container
- **"while true; do echo hello world; sleep 1; done"** is the mini script we want to run, that will just print hello world once a second until we stop it.
- **$CONTAINER_ID** the output of the run command will return a container id, we can use in future commands to see what is going on with this process.
Expand All @@ -35,7 +37,7 @@ Check the logs make sure it is working correctly.

.. code-block:: bash
$ docker attach $CONTAINER_ID
docker attach $CONTAINER_ID
Attach to the container to see the results in realtime.

Expand All @@ -44,7 +46,7 @@ Attach to the container to see the results in realtime.

.. code-block:: bash
$ docker ps
docker ps
Check the process list to make sure it is running.

Expand All @@ -61,7 +63,7 @@ Stop the container, since we don't need it anymore.

.. code-block:: bash
$ docker ps
docker ps
Make sure it is really stopped.

Expand All @@ -76,4 +78,12 @@ See the example in action
<iframe width="560" height="350" src="http://ascii.io/a/2562/raw" frameborder="0"></iframe>
</div>

Continue to the :ref:`python_web_app` example.
Continue to the :ref:`python_web_app` example.


Notes:
------

- **Docker daemon** The docker daemon is started by ``sudo docker -d``, Vagrant may have started
the Docker daemon for you, but you will need to restart it this way if it was terminated. Otherwise
it may give you ``Couldn't create Tag store: open /var/lib/docker/repositories: permission denied``
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<meta name="viewport" content="width=device-width">

<!-- twitter bootstrap -->
<link rel="stylesheet" href="_static/css/bootstrap.min.css">
<link rel="stylesheet" href="_static/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="../_static/css/bootstrap.min.css">
<link rel="stylesheet" href="../_static/css/bootstrap-responsive.min.css">

<!-- main style file -->
<link rel="stylesheet" href="_static/css/main.css">
<link rel="stylesheet" href="../_static/css/main.css">

<!-- vendor scripts -->
<script src="_static/js/vendor/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="_static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js" type="text/javascript" ></script>
<script src="../_static/js/vendor/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="../_static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js" type="text/javascript" ></script>

</head>

Expand All @@ -34,9 +34,9 @@

<div style="float: right" class="pull-right">
<ul class="nav">
<li><a href="index.html">Introduction</a></li>
<li class="active"><a href="gettingstarted.html">Getting started</a></li>
<li class=""><a href="documentation/concepts/containers.html">Documentation</a></li>
<li><a href="../">Introduction</a></li>
<li class="active"><a href="./">Getting started</a></li>
<li class=""><a href="http://docs.docker.io/en/latest/concepts/containers/">Documentation</a></li>
</ul>

<div class="social links" style="float: right; margin-top: 14px; margin-left: 12px">
Expand All @@ -46,7 +46,7 @@
</div>

<div style="margin-left: -12px; float: left;">
<a href="index.html"><img style="margin-top: 12px; height: 38px" src="_static/img/docker-letters-logo.gif"></a>
<a href="../index.html"><img style="margin-top: 12px; height: 38px" src="../_static/img/docker-letters-logo.gif"></a>
</div>
</div>
</div>
Expand Down Expand Up @@ -99,7 +99,7 @@ <h2>
<p>Consider adding docker to your <code>PATH</code> for simplicity.</p>
</li>

Continue with the <a href="documentation/examples/hello_world.html#hello-world">Hello world</a> example.
Continue with the <a href="examples/hello_world.html#hello-world">Hello world</a> example.
</ol>
</section>

Expand All @@ -117,8 +117,8 @@ <h2>Quick install on other operating systems</h2>
vagrant and an Ubuntu virtual machine.</strong></p>

<ul>
<li><a href="documentation/installation/macos.html">Mac OS X and other linuxes</a></li>
<li><a href="documentation/installation/windows.html">Windows</a></li>
<li><a href="installation/macos.html">Mac OS X and other linuxes</a></li>
<li><a href="installation/windows.html">Windows</a></li>
</ul>

</section>
Expand Down Expand Up @@ -180,7 +180,7 @@ <h2>More resources</h2>


<!-- bootstrap javascipts -->
<script src="_static/js/vendor/bootstrap.min.js" type="text/javascript"></script>
<script src="../_static/js/vendor/bootstrap.min.js" type="text/javascript"></script>

<!-- Google analytics -->
<script type="text/javascript">
Expand Down
10 changes: 4 additions & 6 deletions docs/sources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<script src="_static/js/vendor/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="_static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js" type="text/javascript" ></script>



</head>


Expand All @@ -36,9 +34,9 @@

<div class="pull-right" >
<ul class="nav">
<li class="active"><a href="index.html">Introduction</a></li>
<li ><a href="gettingstarted.html">Getting started</a></li>
<li class=""><a href="documentation/concepts/containers.html">Documentation</a></li>
<li class="active"><a href="./">Introduction</a></li>
<li ><a href="gettingstarted/">Getting started</a></li>
<li class=""><a href="http://docs.docker.io/en/latest/concepts/containers/">Documentation</a></li>
</ul>

<div class="social links" style="float: right; margin-top: 14px; margin-left: 12px">
Expand Down Expand Up @@ -89,7 +87,7 @@ <h2>The Linux container runtime</h2>


<div style="display: block; text-align: center;">
<a class="btn btn-custom btn-large" href="gettingstarted.html">Let's get started</a>
<a class="btn btn-custom btn-large" href="gettingstarted/index.html">Let's get started</a>
</div>


Expand Down
24 changes: 13 additions & 11 deletions docs/sources/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
Guides index
============
:title: docker documentation
:description: docker documentation
:keywords:

Contents:
Documentation
=============

This documentation has the following resources:

.. toctree::
:maxdepth: 1

documentation/concepts/index
documentation/installation/index
documentation/examples/index
documentation/contributing/index
documentation/commandline/index
documentation/faq

The source page should also have some content. Otherwise it is just an index.
concepts/index
installation/index
examples/index
contributing/index
commandline/index
faq
Loading

0 comments on commit 47e5d2f

Please sign in to comment.