diff --git a/Vagrantfile b/Vagrantfile index 48b3ef567..01cfd1427 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,19 +2,12 @@ # vi: set ft=ruby : def v10(config) - config.vm.box = "quantal64_3.5.0-25" - config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box" + config.vm.box = 'precise64' + config.vm.box_url = 'http://files.vagrantup.com/precise64.box' - config.vm.share_folder "v-data", "/opt/go/src/github.com/dotcloud/docker", File.dirname(__FILE__) - - # Ensure puppet is installed on the instance - config.vm.provision :shell, :inline => "apt-get -qq update; apt-get install -y puppet" - - config.vm.provision :puppet do |puppet| - puppet.manifests_path = "puppet/manifests" - puppet.manifest_file = "quantal64.pp" - puppet.module_path = "puppet/modules" - end + # Install ubuntu packaging dependencies and create ubuntu packages + config.vm.provision :shell, :inline => "echo 'deb http://ppa.launchpad.net/dotcloud/lxc-docker/ubuntu precise main' >>/etc/apt/sources.list" + config.vm.provision :shell, :inline => 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -qq -y --force-yes lxc-docker' end Vagrant::VERSION < "1.1.0" and Vagrant::Config.run do |config| @@ -30,11 +23,11 @@ Vagrant::VERSION >= "1.1.0" and Vagrant.configure("2") do |config| config.vm.box = "dummy" config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box" aws.access_key_id = ENV["AWS_ACCESS_KEY_ID"] - aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] + aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] aws.keypair_name = ENV["AWS_KEYPAIR_NAME"] aws.ssh_private_key_path = ENV["AWS_SSH_PRIVKEY"] aws.region = "us-east-1" - aws.ami = "ami-ae9806c7" + aws.ami = "ami-d0f89fb9" aws.ssh_username = "ubuntu" aws.instance_type = "t1.micro" end @@ -51,7 +44,39 @@ Vagrant::VERSION >= "1.1.0" and Vagrant.configure("2") do |config| end config.vm.provider :virtualbox do |vb| - config.vm.box = "quantal64_3.5.0-25" - config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box" + config.vm.box = 'precise64' + config.vm.box_url = 'http://files.vagrantup.com/precise64.box' end end + +Vagrant::VERSION >= "1.2.0" and Vagrant.configure("2") do |config| + config.vm.provider :aws do |aws, override| + config.vm.box = "dummy" + config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box" + aws.access_key_id = ENV["AWS_ACCESS_KEY_ID"] + aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] + aws.keypair_name = ENV["AWS_KEYPAIR_NAME"] + override.ssh.private_key_path = ENV["AWS_SSH_PRIVKEY"] + override.ssh.username = "ubuntu" + aws.region = "us-east-1" + aws.ami = "ami-d0f89fb9" + aws.instance_type = "t1.micro" + end + + config.vm.provider :rackspace do |rs| + config.vm.box = "dummy" + config.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box" + config.ssh.private_key_path = ENV["RS_PRIVATE_KEY"] + rs.username = ENV["RS_USERNAME"] + rs.api_key = ENV["RS_API_KEY"] + rs.public_key_path = ENV["RS_PUBLIC_KEY"] + rs.flavor = /512MB/ + rs.image = /Ubuntu/ + end + + config.vm.provider :virtualbox do |vb| + config.vm.box = 'precise64' + config.vm.box_url = 'http://files.vagrantup.com/precise64.box' + end + +end diff --git a/docs/Makefile b/docs/Makefile index f74bf5705..77f14ee92 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -51,6 +51,7 @@ docs: cp sources/dotcloud.yml $(BUILDDIR)/html/ cp sources/CNAME $(BUILDDIR)/html/ cp sources/.nojekyll $(BUILDDIR)/html/ + cp sources/nginx.conf $(BUILDDIR)/html/ @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/docs/sources/examples/python_web_app.rst b/docs/sources/examples/python_web_app.rst index 7b7edc05e..33caa52c1 100644 --- a/docs/sources/examples/python_web_app.rst +++ b/docs/sources/examples/python_web_app.rst @@ -49,7 +49,7 @@ Save the changed we just made in the container to a new image called "_/builds/g WEB_WORKER=$(docker run -d -p 5000 $BUILD_IMG /usr/local/bin/runapp) - **"docker run -d "** run a command in a new container. We pass "-d" so it runs as a daemon. - **"-p 5000"* the web app is going to listen on this port, so it must be mapped from the container to the host system. +- **"-p 5000"** the web app is going to listen on this port, so it must be mapped from the container to the host system. - **"$BUILD_IMG"** is the image we want to run the command inside of. - **/usr/local/bin/runapp** is the command which starts the web app. diff --git a/docs/sources/gettingstarted/index.html b/docs/sources/gettingstarted/index.html index b86e9bbdd..96175d6de 100644 --- a/docs/sources/gettingstarted/index.html +++ b/docs/sources/gettingstarted/index.html @@ -71,34 +71,40 @@

Installing on Ubuntu

+ +

Requirements

+
  1. -

    Install dependencies:

    +

    Install dependencies

    + The linux-image-extra package is only needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module. +
    sudo apt-get install linux-image-extra-`uname -r`
    -
    -
    sudo apt-get install lxc wget bsdtar curl
    -
    sudo apt-get install linux-image-extra-`uname -r`
    -

    The linux-image-extra package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module.

  2. -

    Install the latest docker binary:

    +

    Install Docker

    +

    Add the Ubuntu PPA (Personal Package Archive) sources to your apt sources list, update and install.

    +

    You may see some warnings that the GPG keys cannot be verified.

    +
    +
    sudo sh -c "echo 'deb http://ppa.launchpad.net/dotcloud/lxc-docker/ubuntu precise main' >> /etc/apt/sources.list"
    +
    sudo apt-get update
    +
    sudo apt-get install lxc-docker
    +
    + + +
  3. + +
  4. +

    Run!

    -
    wget http://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-master.tgz
    -
    tar -xf docker-master.tgz
    +
    docker run -i -t ubuntu /bin/bash
  5. -
  6. -

    Run your first container!

    - -
    cd docker-master
    -
    sudo ./docker run -i -t base /bin/bash
    -
    -

    Done!

    -

    Consider adding docker to your PATH for simplicity.

    -
  7. - Continue with the Hello world example.
@@ -117,7 +123,7 @@ vagrant and an Ubuntu virtual machine.

diff --git a/docs/sources/installation/amazon.rst b/docs/sources/installation/amazon.rst index 5260b992b..012c78f40 100644 --- a/docs/sources/installation/amazon.rst +++ b/docs/sources/installation/amazon.rst @@ -1,8 +1,9 @@ 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 + Please note this is a community contributed installation path. The only 'official' installation is using the + :ref:`ubuntu_linux` installation path. This version may sometimes be out of date. + Installation ------------ @@ -17,7 +18,7 @@ Docker can now be installed on Amazon EC2 with a single vagrant command. Vagrant vagrant plugin install vagrant-aws -3. Get the docker sources, this will give you the latest Vagrantfile and puppet manifests. +3. Get the docker sources, this will give you the latest Vagrantfile. :: diff --git a/docs/sources/installation/archlinux.rst b/docs/sources/installation/archlinux.rst index e80997405..db013c6cb 100644 --- a/docs/sources/installation/archlinux.rst +++ b/docs/sources/installation/archlinux.rst @@ -3,6 +3,10 @@ Arch Linux ========== + Please note this is a community contributed installation path. The only 'official' installation is using the + :ref:`ubuntu_linux` installation path. This version may sometimes be out of date. + + Installing on Arch Linux is not officially supported but can be handled via either of the following AUR packages: @@ -40,6 +44,7 @@ new kernel will be compiled and this can take quite a while. yaourt -S lxc-docker-git + Starting Docker --------------- @@ -52,6 +57,7 @@ There is a systemd service unit created for docker. To start the docker service sudo systemctl start docker + To start on system boot: :: diff --git a/docs/sources/installation/binaries.rst b/docs/sources/installation/binaries.rst new file mode 100644 index 000000000..3428f9f27 --- /dev/null +++ b/docs/sources/installation/binaries.rst @@ -0,0 +1,53 @@ +.. _binaries: + +Binaries +======== + + **Please note this project is currently under heavy development. It should not be used in production.** + + +Right now, the officially supported distributions are: + +- Ubuntu 12.04 (precise LTS) (64-bit) +- Ubuntu 12.10 (quantal) (64-bit) + + +Install dependencies: +--------------------- + +:: + + sudo apt-get install lxc bsdtar + sudo apt-get install linux-image-extra-`uname -r` + +The linux-image-extra package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module. + +Install the docker binary: + +:: + + wget http://get.docker.io/builds/Linux/x86_64/docker-master.tgz + tar -xf docker-master.tgz + sudo cp ./docker-master /usr/local/bin + +Note: docker currently only supports 64-bit Linux hosts. + + +Run the docker daemon +--------------------- + +:: + + sudo docker -d & + + +Run your first container! +------------------------- + +:: + + docker run -i -t ubuntu /bin/bash + + + +Continue with the :ref:`hello_world` example. \ No newline at end of file diff --git a/docs/sources/installation/index.rst b/docs/sources/installation/index.rst index b2718c72b..0726d9b71 100644 --- a/docs/sources/installation/index.rst +++ b/docs/sources/installation/index.rst @@ -13,8 +13,9 @@ Contents: :maxdepth: 1 ubuntulinux + binaries archlinux - macos + vagrant windows amazon upgrading diff --git a/docs/sources/installation/macos.rst b/docs/sources/installation/macos.rst deleted file mode 100644 index 09eca22b9..000000000 --- a/docs/sources/installation/macos.rst +++ /dev/null @@ -1,66 +0,0 @@ - -Mac OS X and other linux -======================== - - 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 - - -Requirements ------------- - -We currently rely on some Ubuntu-linux specific packages, this will change in the future, but for now we provide a -streamlined path to install Virtualbox with a Ubuntu 12.10 image using Vagrant. - -1. Install virtualbox from https://www.virtualbox.org/ (or use your package manager) -2. Install vagrant from http://www.vagrantup.com/ (or use your package manager) -3. Install git if you had not installed it before, check if it is installed by running - ``git`` in a terminal window - -We recommend having at least about 2Gb of free disk space and 2Gb RAM (or more). - -Installation ------------- - -1. Fetch the docker sources - -.. code-block:: bash - - git clone https://github.com/dotcloud/docker.git - -2. Run vagrant from the sources directory - -.. code-block:: bash - - vagrant up - -Vagrant will: - -* Download the Quantal64 base ubuntu virtual machine image from get.docker.io/ -* Boot this image in virtualbox - -Then it will use Puppet to perform an initial setup in this machine: - -* Download & untar the most recent docker binary tarball to vagrant homedir. -* Debootstrap to /var/lib/docker/images/ubuntu. -* Install & run dockerd as service. -* Put docker in /usr/local/bin. -* Put latest Go toolchain in /usr/local/go. - -You now have a Ubuntu Virtual Machine running with docker pre-installed. - -To access the VM and use Docker, Run ``vagrant ssh`` from the same directory as where you ran -``vagrant up``. Vagrant will make sure to connect you to the correct VM. - -.. code-block:: bash - - vagrant ssh - -Now you are in the VM, run docker - -.. code-block:: bash - - docker - - -Continue with the :ref:`hello_world` example. diff --git a/docs/sources/installation/ubuntulinux.rst b/docs/sources/installation/ubuntulinux.rst index 6149a26f2..ebf9876e2 100644 --- a/docs/sources/installation/ubuntulinux.rst +++ b/docs/sources/installation/ubuntulinux.rst @@ -1,56 +1,61 @@ .. _ubuntu_linux: -Installing on Ubuntu Linux -========================== +Ubuntu Linux +============ **Please note this project is currently under heavy development. It should not be used in production.** - -Installing on Ubuntu 12.04 and 12.10 - Right now, the officially supported distributions are: -* Ubuntu 12.04 (precise LTS) -* Ubuntu 12.10 (quantal) +- Ubuntu 12.04 (precise LTS) (64-bit) +- Ubuntu 12.10 (quantal) (64-bit) -Install dependencies: ---------------------- +Dependencies +------------ -:: +The linux-image-extra package is only needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module. - sudo apt-get install lxc bsdtar - sudo apt-get install linux-image-extra-`uname -r` +.. code-block:: bash -The linux-image-extra package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module. - -Install the docker binary -------------------------- - -:: - - wget http://get.docker.io/builds/Linux/x86_64/docker-master.tgz - tar -xf docker-master.tgz - sudo cp ./docker-master /usr/local/bin - -Note: docker currently only supports 64-bit Linux hosts. + sudo apt-get install linux-image-extra-`uname -r` -Run the docker daemon ---------------------- +Installation +------------ -:: - - sudo docker -d & - -Run your first container! -------------------------- - -:: - docker run -i -t ubuntu /bin/bash +Docker is available as a Ubuntu PPA (Personal Package Archive), +`hosted on launchpad `_ +which makes installing Docker on Ubuntu very easy. -Check out more examples ------------------------ -Continue with the :ref:`hello_world` example. +Add the custom package sources to your apt sources list. Copy and paste the following lines at once. + +.. code-block:: bash + + sudo sh -c "echo 'deb http://ppa.launchpad.net/dotcloud/lxc-docker/ubuntu precise main' >> /etc/apt/sources.list" + + +Update your sources. You will see a warning that GPG signatures cannot be verified. + +.. code-block:: bash + + sudo apt-get update + + +Now install it, you will see another warning that the package cannot be authenticated. Confirm install. + +.. code-block:: bash + + sudo apt-get install lxc-docker + + +Verify it worked + +.. code-block:: bash + + docker + + +**Done!**, now continue with the :ref:`hello_world` example. diff --git a/docs/sources/installation/upgrading.rst b/docs/sources/installation/upgrading.rst index 4a1de88a7..66825ac64 100644 --- a/docs/sources/installation/upgrading.rst +++ b/docs/sources/installation/upgrading.rst @@ -3,7 +3,8 @@ Upgrading ============ - We assume you are upgrading from within the operating system which runs your docker daemon. +These instructions are for upgrading your Docker binary for when you had a custom (non package manager) installation. +If you istalled docker using apt-get, use that to upgrade. Get the latest docker binary: diff --git a/docs/sources/installation/vagrant.rst b/docs/sources/installation/vagrant.rst new file mode 100644 index 000000000..465a6c338 --- /dev/null +++ b/docs/sources/installation/vagrant.rst @@ -0,0 +1,70 @@ + +.. _install_using_vagrant: + +Using Vagrant +============= + + Please note this is a community contributed installation path. The only 'official' installation is using the + :ref:`ubuntu_linux` installation path. This version may sometimes be out of date. + +**Requirements:** +This guide will setup a new virtual machine with docker installed on your computer. This works on most operating +systems, including MacOX, Windows, Linux, FreeBSD and others. If you can install these and have at least 400Mb RAM +to spare you should be good. + + +Install Vagrant and Virtualbox +------------------------------ + +1. Install virtualbox from https://www.virtualbox.org/ (or use your package manager) +2. Install vagrant from http://www.vagrantup.com/ (or use your package manager) +3. Install git if you had not installed it before, check if it is installed by running + ``git`` in a terminal window + + +Spin it up +---------- + +1. Fetch the docker sources (this includes the Vagrantfile for machine setup). + + .. code-block:: bash + + git clone https://github.com/dotcloud/docker.git + +2. Run vagrant from the sources directory + + .. code-block:: bash + + vagrant up + + Vagrant will: + + * Download the 'official' Precise64 base ubuntu virtual machine image from vagrantup.com + * Boot this image in virtualbox + * Add the `Docker PPA sources `_ to /etc/apt/sources.lst + * Update your sources + * Install lxc-docker + + You now have a Ubuntu Virtual Machine running with docker pre-installed. + +Connect +------- + +To access the VM and use Docker, Run ``vagrant ssh`` from the same directory as where you ran +``vagrant up``. Vagrant will connect you to the correct VM. + +.. code-block:: bash + + vagrant ssh + +Run +----- + +Now you are in the VM, run docker + +.. code-block:: bash + + docker + + +Continue with the :ref:`hello_world` example. diff --git a/docs/sources/installation/windows.rst b/docs/sources/installation/windows.rst index 6091d6bac..a89d3a901 100644 --- a/docs/sources/installation/windows.rst +++ b/docs/sources/installation/windows.rst @@ -3,8 +3,8 @@ :keywords: Docker, Docker documentation, Windows, requirements, virtualbox, vagrant, git, ssh, putty, cygwin -Windows -========= +Windows (with Vagrant) +====================== 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/nginx.conf b/docs/sources/nginx.conf new file mode 100644 index 000000000..97ffd2c0e --- /dev/null +++ b/docs/sources/nginx.conf @@ -0,0 +1,6 @@ + +# rule to redirect original links created when hosted on github pages +rewrite ^/documentation/(.*).html http://docs.docker.io/en/latest/$1/ permanent; + +# rewrite the stuff which was on the current page +rewrite ^/gettingstarted.html$ /gettingstarted/ permanent;