| ... | ... |
@@ -6,6 +6,7 @@ Docker complements LXC with a high-level API which operates at the process level |
| 6 | 6 |
Docker is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc. |
| 7 | 7 |
|
| 8 | 8 |
 |
| 9 |
+======= |
|
| 9 | 10 |
|
| 10 | 11 |
* *Heterogeneous payloads*: any combination of binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, you name it. No more juggling between domain-specific tools. Docker can deploy and run them all. |
| 11 | 12 |
|
| ... | ... |
@@ -16,7 +16,7 @@ out every second. It will continue to do this until we stop it. |
| 16 | 16 |
|
| 17 | 17 |
.. code-block:: bash |
| 18 | 18 |
|
| 19 |
- $ CONTAINER_ID=$(docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done") |
|
| 19 |
+ CONTAINER_ID=$(docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done") |
|
| 20 | 20 |
|
| 21 | 21 |
We are going to run a simple hello world daemon in a new container made from the busybox daemon. |
| 22 | 22 |
|
| ... | ... |
@@ -28,7 +28,7 @@ We are going to run a simple hello world daemon in a new container made from the |
| 28 | 28 |
|
| 29 | 29 |
.. code-block:: bash |
| 30 | 30 |
|
| 31 |
- $ docker logs $CONTAINER_ID |
|
| 31 |
+ docker logs $CONTAINER_ID |
|
| 32 | 32 |
|
| 33 | 33 |
Check the logs make sure it is working correctly. |
| 34 | 34 |
|
| ... | ... |
@@ -54,7 +54,7 @@ Check the process list to make sure it is running. |
| 54 | 54 |
|
| 55 | 55 |
.. code-block:: bash |
| 56 | 56 |
|
| 57 |
- $ docker stop $CONTAINER_ID |
|
| 57 |
+ docker stop $CONTAINER_ID |
|
| 58 | 58 |
|
| 59 | 59 |
Stop the container, since we don't need it anymore. |
| 60 | 60 |
|
| ... | ... |
@@ -12,44 +12,44 @@ The goal of this example is to show you how you can author your own docker image |
| 12 | 12 |
|
| 13 | 13 |
.. code-block:: bash |
| 14 | 14 |
|
| 15 |
- $ docker pull shykes/pybuilder |
|
| 15 |
+ docker pull shykes/pybuilder |
|
| 16 | 16 |
|
| 17 | 17 |
We are downloading the "shykes/pybuilder" docker image |
| 18 | 18 |
|
| 19 | 19 |
.. code-block:: bash |
| 20 | 20 |
|
| 21 |
- $ URL=http://github.com/shykes/helloflask/archive/master.tar.gz |
|
| 21 |
+ URL=http://github.com/shykes/helloflask/archive/master.tar.gz |
|
| 22 | 22 |
|
| 23 | 23 |
We set a URL variable that points to a tarball of a simple helloflask web app |
| 24 | 24 |
|
| 25 | 25 |
.. code-block:: bash |
| 26 | 26 |
|
| 27 |
- $ BUILD_JOB=$(docker run -d -t shykes/pybuilder:latest /usr/local/bin/buildapp $URL) |
|
| 27 |
+ BUILD_JOB=$(docker run -d -t shykes/pybuilder:latest /usr/local/bin/buildapp $URL) |
|
| 28 | 28 |
|
| 29 | 29 |
Inside of the "shykes/pybuilder" image there is a command called buildapp, we are running that command and passing the $URL variable from step 2 to it, and running the whole thing inside of a new container. BUILD_JOB will be set with the new container_id. |
| 30 | 30 |
|
| 31 | 31 |
.. code-block:: bash |
| 32 | 32 |
|
| 33 |
- $ docker attach $BUILD_JOB |
|
| 33 |
+ docker attach $BUILD_JOB |
|
| 34 | 34 |
[...] |
| 35 | 35 |
|
| 36 | 36 |
We attach to the new container to see what is going on. Ctrl-C to disconnect |
| 37 | 37 |
|
| 38 | 38 |
.. code-block:: bash |
| 39 | 39 |
|
| 40 |
- $ BUILD_IMG=$(docker commit $BUILD_JOB _/builds/github.com/hykes/helloflask/master) |
|
| 40 |
+ BUILD_IMG=$(docker commit $BUILD_JOB _/builds/github.com/hykes/helloflask/master) |
|
| 41 | 41 |
|
| 42 | 42 |
Save the changed we just made in the container to a new image called "_/builds/github.com/hykes/helloflask/master" and save the image id in the BUILD_IMG variable name. |
| 43 | 43 |
|
| 44 | 44 |
.. code-block:: bash |
| 45 | 45 |
|
| 46 |
- $ WEB_WORKER=$(docker run -d -p 5000 $BUILD_IMG /usr/local/bin/runapp) |
|
| 46 |
+ WEB_WORKER=$(docker run -d -p 5000 $BUILD_IMG /usr/local/bin/runapp) |
|
| 47 | 47 |
|
| 48 | 48 |
Use the new image we just created and create a new container with network port 5000, and return the container id and store in the WEB_WORKER variable. |
| 49 | 49 |
|
| 50 | 50 |
.. code-block:: bash |
| 51 | 51 |
|
| 52 |
- $ docker logs $WEB_WORKER |
|
| 52 |
+ docker logs $WEB_WORKER |
|
| 53 | 53 |
* Running on http://0.0.0.0:5000/ |
| 54 | 54 |
|
| 55 | 55 |
view the logs for the new container using the WEB_WORKER variable, and if everything worked as planned you should see the line "Running on http://0.0.0.0:5000/" in the log output. |
| ... | ... |
@@ -63,7 +63,7 @@ |
| 63 | 63 |
|
| 64 | 64 |
<div class="container"> |
| 65 | 65 |
<div class="alert alert-info"> |
| 66 |
- <strong>Docker is still under heavy development.</strong> It should not yet be used in production. Check <a href="http://github.com/dotcloud/docker">the repo</a> for recent progress. |
|
| 66 |
+ <strong>Docker is still under heavy development.</strong> It should not yet be used in production. Check <a href="http://github.com/dotcloud/docker">the repo</a> for recent progress. |
|
| 67 | 67 |
</div> |
| 68 | 68 |
<div class="row"> |
| 69 | 69 |
<div class="span6"> |
| ... | ... |
@@ -76,8 +76,8 @@ |
| 76 | 76 |
<p>Install dependencies:</p> |
| 77 | 77 |
|
| 78 | 78 |
<div class="highlight"> |
| 79 |
- <pre>sudo apt-get install lxc wget bsdtar curl</pre> |
|
| 80 |
- <pre>sudo apt-get install linux-image-extra-<span class="sb">`</span>uname -r<span class="sb">`</span></pre></div> |
|
| 79 |
+ <pre>sudo apt-get install lxc wget bsdtar curl</pre> |
|
| 80 |
+ <pre>sudo apt-get install linux-image-extra-<span class="sb">`</span>uname -r<span class="sb">`</span></pre></div> |
|
| 81 | 81 |
|
| 82 | 82 |
<p>The <code>linux-image-extra</code> package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module.</p> |
| 83 | 83 |
</li> |
| ... | ... |
@@ -85,28 +85,28 @@ |
| 85 | 85 |
<p>Install the latest docker binary:</p> |
| 86 | 86 |
|
| 87 | 87 |
<div class="highlight"> |
| 88 |
- <pre>wget http://get.docker.io/builds/<span class="k">$(</span>uname -s<span class="k">)</span>/<span class="k">$(</span>uname -m<span class="k">)</span>/docker-master.tgz</pre> |
|
| 89 |
- <pre>tar -xf docker-master.tgz</pre> |
|
| 88 |
+ <pre>wget http://get.docker.io/builds/<span class="k">$(</span>uname -s<span class="k">)</span>/<span class="k">$(</span>uname -m<span class="k">)</span>/docker-master.tgz</pre> |
|
| 89 |
+ <pre>tar -xf docker-master.tgz</pre> |
|
| 90 | 90 |
</div> |
| 91 | 91 |
</li> |
| 92 | 92 |
<li> |
| 93 | 93 |
<p>Run your first container!</p> |
| 94 | 94 |
|
| 95 | 95 |
<div class="highlight"><pre><span class="nb">cd </span>docker-master</pre> |
| 96 |
- <pre>sudo ./docker run -i -t base /bin/bash</pre> |
|
| 96 |
+ <pre>sudo ./docker run -i -t base /bin/bash</pre> |
|
| 97 | 97 |
</div> |
| 98 | 98 |
<p>Done!</p> |
| 99 | 99 |
<p>Consider adding docker to your <code>PATH</code> for simplicity.</p> |
| 100 | 100 |
</li> |
| 101 | 101 |
|
| 102 |
- Continue with the <a href="examples/hello_world.html#hello-world">Hello world</a> example. |
|
| 102 |
+ Continue with the <a href="http://docs.docker.io/en/latest/examples/hello_world/">Hello world</a> example. |
|
| 103 | 103 |
</ol> |
| 104 | 104 |
</section> |
| 105 | 105 |
|
| 106 | 106 |
<section class="contentblock"> |
| 107 | 107 |
<h2>Contributing to Docker</h2> |
| 108 | 108 |
|
| 109 |
- <p>Want to hack on Docker? Awesome! We have some <a href="/documentation/contributing/contributing.html">instructions to get you started</a>. They are probably not perfect, please let us know if anything feels wrong or incomplete.</p> |
|
| 109 |
+ <p>Want to hack on Docker? Awesome! We have some <a href="http://docs.docker.io/en/latest/contributing/contributing/">instructions to get you started</a>. They are probably not perfect, please let us know if anything feels wrong or incomplete.</p> |
|
| 110 | 110 |
</section> |
| 111 | 111 |
|
| 112 | 112 |
</div> |
| ... | ... |
@@ -117,8 +117,8 @@ |
| 117 | 117 |
vagrant and an Ubuntu virtual machine.</strong></p> |
| 118 | 118 |
|
| 119 | 119 |
<ul> |
| 120 |
- <li><a href="installation/macos.html">Mac OS X and other linuxes</a></li> |
|
| 121 |
- <li><a href="installation/windows.html">Windows</a></li> |
|
| 120 |
+ <li><a href="http://docs.docker.io/en/latest/installation/macos/">Mac OS X and other linuxes</a></li> |
|
| 121 |
+ <li><a href="http://docs.docker.io/en/latest/installation/windows/">Windows</a></li> |
|
| 122 | 122 |
</ul> |
| 123 | 123 |
|
| 124 | 124 |
</section> |
| ... | ... |
@@ -87,7 +87,7 @@ |
| 87 | 87 |
|
| 88 | 88 |
|
| 89 | 89 |
<div style="display: block; text-align: center;"> |
| 90 |
- <a class="btn btn-custom btn-large" href="gettingstarted/index.html">Let's get started</a> |
|
| 90 |
+ <a class="btn btn-custom btn-large" href="gettingstarted/">Let's get started</a> |
|
| 91 | 91 |
</div> |
| 92 | 92 |
|
| 93 | 93 |
|