From f87aa7e336ea4eba16042d17304cca146d75ebb7 Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Tue, 26 Mar 2013 12:00:46 -0700 Subject: [PATCH 1/7] Added files REQUIRED to have succesfull gh-pages deploy (i.c.w. sphinx) --- docs/Makefile | 2 ++ docs/sources/.nojekyll | 0 docs/sources/CNAME | 1 + docs/sources/documentation/installation/macos.rst | 2 +- docs/sources/documentation/installation/windows.rst | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 docs/sources/.nojekyll create mode 100644 docs/sources/CNAME diff --git a/docs/Makefile b/docs/Makefile index f58854dcd..a9006a062 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -49,6 +49,8 @@ docs: cp sources/index.html $(BUILDDIR)/html/ cp sources/gettingstarted.html $(BUILDDIR)/html/ cp sources/dotcloud.yml $(BUILDDIR)/html/ + cp sources/CNAME $(BUILDDIR)/html/ + cp sources/.nojekyll $(BUILDDIR)/html/ @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/docs/sources/.nojekyll b/docs/sources/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/docs/sources/CNAME b/docs/sources/CNAME new file mode 100644 index 000000000..243e48226 --- /dev/null +++ b/docs/sources/CNAME @@ -0,0 +1 @@ +docker.io diff --git a/docs/sources/documentation/installation/macos.rst b/docs/sources/documentation/installation/macos.rst index 1f46b838a..199c37b74 100644 --- a/docs/sources/documentation/installation/macos.rst +++ b/docs/sources/documentation/installation/macos.rst @@ -2,7 +2,7 @@ Mac OS X and other linux ======================== - Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version + Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version may be out of date because it depends on some binaries to be updated and published diff --git a/docs/sources/documentation/installation/windows.rst b/docs/sources/documentation/installation/windows.rst index 7c0b15be4..105fb7aaf 100644 --- a/docs/sources/documentation/installation/windows.rst +++ b/docs/sources/documentation/installation/windows.rst @@ -6,7 +6,7 @@ Windows ========= - Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version + Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version may be out of date because it depends on some binaries to be updated and published From 84df72222d82fe5530da8f9c42156169519037d8 Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Tue, 26 Mar 2013 14:31:45 -0700 Subject: [PATCH 2/7] Typo in macosx tutorial --- docs/sources/documentation/installation/macos.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/documentation/installation/macos.rst b/docs/sources/documentation/installation/macos.rst index 199c37b74..09eca22b9 100644 --- a/docs/sources/documentation/installation/macos.rst +++ b/docs/sources/documentation/installation/macos.rst @@ -32,7 +32,7 @@ Installation .. code-block:: bash - vagant up + vagrant up Vagrant will: From 709849e717da1f0c509d0cf62414141e62a09eb7 Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Tue, 26 Mar 2013 16:29:21 -0700 Subject: [PATCH 3/7] Added Amazon AWS tutorial (can be activated after @sub_'s pull request is accepted. --- .../documentation/installation/amazon.rst | 95 +++++++++++++------ .../documentation/installation/index.rst | 1 + 2 files changed, 65 insertions(+), 31 deletions(-) diff --git a/docs/sources/documentation/installation/amazon.rst b/docs/sources/documentation/installation/amazon.rst index 730a77e62..5260b992b 100644 --- a/docs/sources/documentation/installation/amazon.rst +++ b/docs/sources/documentation/installation/amazon.rst @@ -1,54 +1,87 @@ Amazon EC2 ========== - + Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version + may be out of date because it depends on some binaries to be updated and published Installation ------------ -Install vagrant from http://www.vagrantup.com/ (or use your package manager) +Docker can now be installed on Amazon EC2 with a single vagrant command. Vagrant 1.1 or higher is required. -clone the repo +1. Install vagrant from http://www.vagrantup.com/ (or use your package manager) +2. Install the vagrant aws plugin + + :: + + vagrant plugin install vagrant-aws -Docker can be installed with Vagrant on Amazon EC2, using Vagrant 1.1 is required for EC2, but deploying is as simple as: +3. Get the docker sources, this will give you the latest Vagrantfile and puppet manifests. -:: + :: - $ export AWS_ACCESS_KEY_ID=xxx \ - AWS_SECRET_ACCESS_KEY=xxx \ - AWS_KEYPAIR_NAME=xxx \ - AWS_SSH_PRIVKEY=xxx - -:: - - $ vagrant plugin install vagrant-aws - -:: - - $ vagrant up --provider=aws - -The environment variables are: - -* ``AWS_ACCESS_KEY_ID`` - The API key used to make requests to AWS -* ``AWS_SECRET_ACCESS_KEY`` - The secret key to make AWS API requests -* ``AWS_KEYPAIR_NAME`` - The ID of the keypair used for this EC2 instance -* ``AWS_SSH_PRIVKEY`` - The path to the private key for the named keypair + git clone https://github.com/dotcloud/docker.git -Make sure your default security zone on AWS includes rights to SSH to your container. Otherwise access will -fail silently. +4. Check your AWS environment. + + Create a keypair specifically for EC2, give it a name and save it to your disk. *I usually store these in my ~/.ssh/ folder*. + + Check that your default security group has an inbound rule to accept SSH (port 22) connections. -.. code-block:: bash - vagrant ssh +5. Inform Vagrant of your settings -Now you are in the VM, run docker + Vagrant will read your access credentials from your environment, so we need to set them there first. Make sure + you have everything on amazon aws setup so you can (manually) deploy a new image to EC2. -.. code-block:: bash + :: - docker + export AWS_ACCESS_KEY_ID=xxx + export AWS_SECRET_ACCESS_KEY=xxx + export AWS_KEYPAIR_NAME=xxx + export AWS_SSH_PRIVKEY=xxx + + The environment variables are: + + * ``AWS_ACCESS_KEY_ID`` - The API key used to make requests to AWS + * ``AWS_SECRET_ACCESS_KEY`` - The secret key to make AWS API requests + * ``AWS_KEYPAIR_NAME`` - The name of the keypair used for this EC2 instance + * ``AWS_SSH_PRIVKEY`` - The path to the private key for the named keypair, for example ``~/.ssh/docker.pem`` + + You can check if they are set correctly by doing something like + + :: + + echo $AWS_ACCESS_KEY_ID + +6. Do the magic! + + :: + + vagrant up --provider=aws + + + If it stalls indefinitely on ``[default] Waiting for SSH to become available...``, Double check your default security + zone on AWS includes rights to SSH (port 22) to your container. + + If you have an advanced AWS setup, you might want to have a look at the https://github.com/mitchellh/vagrant-aws + +7. Connect to your machine + + .. code-block:: bash + + vagrant ssh + +8. Your first command + + Now you are in the VM, run docker + + .. code-block:: bash + + docker Continue with the :ref:`hello_world` example. \ No newline at end of file diff --git a/docs/sources/documentation/installation/index.rst b/docs/sources/documentation/installation/index.rst index 593004f81..095bc2bca 100644 --- a/docs/sources/documentation/installation/index.rst +++ b/docs/sources/documentation/installation/index.rst @@ -15,3 +15,4 @@ Contents: ubuntulinux macos windows + amazon From 8cfaf658ccae041400f142227d0813ceb0f263db Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Tue, 26 Mar 2013 18:21:52 -0700 Subject: [PATCH 4/7] Updated hello world examples --- .../documentation/examples/hello_world.rst | 24 +++++++++++++++---- .../examples/hello_world_daemon.rst | 24 +++++++++++++------ 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/docs/sources/documentation/examples/hello_world.rst b/docs/sources/documentation/examples/hello_world.rst index b6c07a2b9..581608488 100644 --- a/docs/sources/documentation/examples/hello_world.rst +++ b/docs/sources/documentation/examples/hello_world.rst @@ -8,19 +8,34 @@ Hello World =========== This is the most basic example available for using docker -This example assumes you have Docker installed and it will download the busybox image and then use that image to run a simple echo command, that will echo hello world back to the console over standard out. +This example assumes you have Docker installed. + + +Download the base container .. code-block:: bash - $ docker run busybox /bin/echo hello world + # Download a base image + docker pull base + +The *base* image is a minimal Debian 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 -- **"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/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 @@ -28,7 +43,8 @@ See the example in action .. raw:: html
- +
+ Continue to the :ref:`hello_world_daemon` example. \ No newline at end of file diff --git a/docs/sources/documentation/examples/hello_world_daemon.rst b/docs/sources/documentation/examples/hello_world_daemon.rst index 8abe0e735..fc3095e1e 100644 --- a/docs/sources/documentation/examples/hello_world_daemon.rst +++ b/docs/sources/documentation/examples/hello_world_daemon.rst @@ -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. @@ -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. @@ -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. @@ -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. @@ -76,4 +78,12 @@ See the example in action -Continue to the :ref:`python_web_app` example. \ No newline at end of file +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`` From 502f772839859823639aef1add8d5463e5be11fc Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Tue, 26 Mar 2013 18:28:46 -0700 Subject: [PATCH 5/7] not debian, but ubuntu is in base image --- docs/sources/documentation/examples/hello_world.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/documentation/examples/hello_world.rst b/docs/sources/documentation/examples/hello_world.rst index 581608488..9e3988960 100644 --- a/docs/sources/documentation/examples/hello_world.rst +++ b/docs/sources/documentation/examples/hello_world.rst @@ -18,7 +18,7 @@ Download the base container # Download a base image docker pull base -The *base* image is a minimal Debian based container, alternatively you can select *busybox*, a bare +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. From 3b71336edcd3798a11ea8a2f9c94b012357b32c3 Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Wed, 27 Mar 2013 16:43:13 -0700 Subject: [PATCH 6/7] Made changes to incorporate extermal docs.docker.io. Also took out /documentation/ dir so sources are easier accessible and the folder is not redundant on docs.docker.io/documentation/ --- docs/Makefile | 2 +- .../commandline/basecommands.rst | 0 .../{documentation => }/commandline/cli.rst | 0 .../{documentation => }/commandline/index.rst | 0 .../concepts/containers.rst | 0 .../{documentation => }/concepts/index.rst | 0 .../contributing/contributing.rst | 0 .../contributing/devenvironment.rst | 0 .../contributing/index.rst | 0 docs/sources/documentation/index.rst | 18 -- .../examples/hello_world.rst | 0 .../examples/hello_world_daemon.rst | 0 .../{documentation => }/examples/index.rst | 0 .../examples/python_web_app.rst | 0 docs/sources/{documentation => }/faq.rst | 0 docs/sources/gettingstarted.html | 8 +- docs/sources/index.html | 4 +- docs/sources/index.rst | 24 +- docs/sources/index_orig.html | 245 ------------------ .../installation/amazon.rst | 0 .../installation/images/win/_01.gif | Bin .../installation/images/win/_02.gif | Bin .../installation/images/win/_06.gif | Bin .../installation/images/win/cygwin.gif | Bin .../installation/images/win/putty.gif | Bin .../installation/images/win/putty_2.gif | Bin .../installation/images/win/run_02_.gif | Bin .../installation/images/win/run_03.gif | Bin .../installation/images/win/run_04.gif | Bin .../installation/images/win/ssh-config.gif | Bin .../installation/index.rst | 0 .../installation/macos.rst | 0 .../installation/ubuntulinux.rst | 0 .../installation/windows.rst | 0 docs/theme/docker/layout.html | 11 +- 35 files changed, 22 insertions(+), 290 deletions(-) rename docs/sources/{documentation => }/commandline/basecommands.rst (100%) rename docs/sources/{documentation => }/commandline/cli.rst (100%) rename docs/sources/{documentation => }/commandline/index.rst (100%) rename docs/sources/{documentation => }/concepts/containers.rst (100%) rename docs/sources/{documentation => }/concepts/index.rst (100%) rename docs/sources/{documentation => }/contributing/contributing.rst (100%) rename docs/sources/{documentation => }/contributing/devenvironment.rst (100%) rename docs/sources/{documentation => }/contributing/index.rst (100%) delete mode 100644 docs/sources/documentation/index.rst rename docs/sources/{documentation => }/examples/hello_world.rst (100%) rename docs/sources/{documentation => }/examples/hello_world_daemon.rst (100%) rename docs/sources/{documentation => }/examples/index.rst (100%) rename docs/sources/{documentation => }/examples/python_web_app.rst (100%) rename docs/sources/{documentation => }/faq.rst (100%) delete mode 100644 docs/sources/index_orig.html rename docs/sources/{documentation => }/installation/amazon.rst (100%) rename docs/sources/{documentation => }/installation/images/win/_01.gif (100%) rename docs/sources/{documentation => }/installation/images/win/_02.gif (100%) rename docs/sources/{documentation => }/installation/images/win/_06.gif (100%) rename docs/sources/{documentation => }/installation/images/win/cygwin.gif (100%) rename docs/sources/{documentation => }/installation/images/win/putty.gif (100%) rename docs/sources/{documentation => }/installation/images/win/putty_2.gif (100%) rename docs/sources/{documentation => }/installation/images/win/run_02_.gif (100%) rename docs/sources/{documentation => }/installation/images/win/run_03.gif (100%) rename docs/sources/{documentation => }/installation/images/win/run_04.gif (100%) rename docs/sources/{documentation => }/installation/images/win/ssh-config.gif (100%) rename docs/sources/{documentation => }/installation/index.rst (100%) rename docs/sources/{documentation => }/installation/macos.rst (100%) rename docs/sources/{documentation => }/installation/ubuntulinux.rst (100%) rename docs/sources/{documentation => }/installation/windows.rst (100%) diff --git a/docs/Makefile b/docs/Makefile index d7602ae82..29c40a6ac 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -45,7 +45,7 @@ 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 sources/dotcloud.yml $(BUILDDIR)/html/ diff --git a/docs/sources/documentation/commandline/basecommands.rst b/docs/sources/commandline/basecommands.rst similarity index 100% rename from docs/sources/documentation/commandline/basecommands.rst rename to docs/sources/commandline/basecommands.rst diff --git a/docs/sources/documentation/commandline/cli.rst b/docs/sources/commandline/cli.rst similarity index 100% rename from docs/sources/documentation/commandline/cli.rst rename to docs/sources/commandline/cli.rst diff --git a/docs/sources/documentation/commandline/index.rst b/docs/sources/commandline/index.rst similarity index 100% rename from docs/sources/documentation/commandline/index.rst rename to docs/sources/commandline/index.rst diff --git a/docs/sources/documentation/concepts/containers.rst b/docs/sources/concepts/containers.rst similarity index 100% rename from docs/sources/documentation/concepts/containers.rst rename to docs/sources/concepts/containers.rst diff --git a/docs/sources/documentation/concepts/index.rst b/docs/sources/concepts/index.rst similarity index 100% rename from docs/sources/documentation/concepts/index.rst rename to docs/sources/concepts/index.rst diff --git a/docs/sources/documentation/contributing/contributing.rst b/docs/sources/contributing/contributing.rst similarity index 100% rename from docs/sources/documentation/contributing/contributing.rst rename to docs/sources/contributing/contributing.rst diff --git a/docs/sources/documentation/contributing/devenvironment.rst b/docs/sources/contributing/devenvironment.rst similarity index 100% rename from docs/sources/documentation/contributing/devenvironment.rst rename to docs/sources/contributing/devenvironment.rst diff --git a/docs/sources/documentation/contributing/index.rst b/docs/sources/contributing/index.rst similarity index 100% rename from docs/sources/documentation/contributing/index.rst rename to docs/sources/contributing/index.rst diff --git a/docs/sources/documentation/index.rst b/docs/sources/documentation/index.rst deleted file mode 100644 index 92efc113e..000000000 --- a/docs/sources/documentation/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -:title: docker documentation -:description: docker documentation -:keywords: - -Documentation -============= - -This documentation has the following resources: - -.. toctree:: - :maxdepth: 1 - - concepts/index - installation/index - examples/index - contributing/index - commandline/index - faq \ No newline at end of file diff --git a/docs/sources/documentation/examples/hello_world.rst b/docs/sources/examples/hello_world.rst similarity index 100% rename from docs/sources/documentation/examples/hello_world.rst rename to docs/sources/examples/hello_world.rst diff --git a/docs/sources/documentation/examples/hello_world_daemon.rst b/docs/sources/examples/hello_world_daemon.rst similarity index 100% rename from docs/sources/documentation/examples/hello_world_daemon.rst rename to docs/sources/examples/hello_world_daemon.rst diff --git a/docs/sources/documentation/examples/index.rst b/docs/sources/examples/index.rst similarity index 100% rename from docs/sources/documentation/examples/index.rst rename to docs/sources/examples/index.rst diff --git a/docs/sources/documentation/examples/python_web_app.rst b/docs/sources/examples/python_web_app.rst similarity index 100% rename from docs/sources/documentation/examples/python_web_app.rst rename to docs/sources/examples/python_web_app.rst diff --git a/docs/sources/documentation/faq.rst b/docs/sources/faq.rst similarity index 100% rename from docs/sources/documentation/faq.rst rename to docs/sources/faq.rst diff --git a/docs/sources/gettingstarted.html b/docs/sources/gettingstarted.html index 7d198629c..4b9459502 100644 --- a/docs/sources/gettingstarted.html +++ b/docs/sources/gettingstarted.html @@ -36,7 +36,7 @@