diff --git a/Vagrantfile b/Vagrantfile index 48b3ef567a..01cfd14272 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 f74bf5705e..77f14ee92f 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 7b7edc05e3..33caa52c1e 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 b86e9bbdd4..96175d6dec 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 5260b992bd..012c78f401 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 e809974053..db013c6cb9 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 0000000000..3428f9f279 --- /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 b2718c72b1..0726d9b715 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 09eca22b92..0000000000 --- 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 6149a26f28..ebf9876e22 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 4a1de88a7c..66825ac643 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 0000000000..465a6c3388 --- /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 6091d6bac1..a89d3a9014 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 0000000000..97ffd2c0e5 --- /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; diff --git a/packaging/ubuntu/changelog b/packaging/ubuntu/changelog index aa5ea6cc87..b0c691366d 100644 --- a/packaging/ubuntu/changelog +++ b/packaging/ubuntu/changelog @@ -1,30 +1,110 @@ +lxc-docker (0.1.8-1) precise; urgency=low + + - Dynamically detect cgroup capabilities + - Issue stability warning on kernels <3.8 + - 'docker push' buffers on disk instead of memory + - Fix 'docker diff' for removed files + - Fix 'docker stop' for ghost containers + - Fix handling of pidfile + - Various bugfixes and stability improvements + + -- dotCloud Mon, 22 Apr 2013 00:00:00 -0700 + + +lxc-docker (0.1.7-1) precise; urgency=low + + - Container ports are available on localhost + - 'docker ps' shows allocated TCP ports + - Contributors can run 'make hack' to start a continuous integration VM + - Streamline ubuntu packaging & uploading + - Various bugfixes and stability improvements + + -- dotCloud Thu, 18 Apr 2013 00:00:00 -0700 + + lxc-docker (0.1.6-1) precise; urgency=low - Improvements [+], Updates [*], Bug fixes [-]: - + Multiple improvements, updates and bug fixes + - Record the author an image with 'docker commit -author' - -- dotCloud Wed, 17 Apr 2013 20:43:43 -0700 + -- dotCloud Wed, 17 Apr 2013 00:00:00 -0700 -lxc-docker (0.1.4.1-1) precise; urgency=low +lxc-docker (0.1.5-1) precise; urgency=low - Improvements [+], Updates [*], Bug fixes [-]: - * Test PPA + - Disable standalone mode + - Use a custom DNS resolver with 'docker -d -dns' + - Detect ghost containers + - Improve diagnosis of missing system capabilities + - Allow disabling memory limits at compile time + - Add debian packaging + - Documentation: installing on Arch Linux + - Documentation: running Redis on docker + - Fixed lxc 0.9 compatibility + - Automatically load aufs module + - Various bugfixes and stability improvements - -- dotCloud Mon, 15 Apr 2013 12:14:50 -0700 + -- dotCloud Wed, 17 Apr 2013 00:00:00 -0700 lxc-docker (0.1.4-1) precise; urgency=low - Improvements [+], Updates [*], Bug fixes [-]: - * Changed default bridge interface do 'docker0' - - Fix a race condition when running the port allocator + - Full support for TTY emulation + - Detach from a TTY session with the escape sequence `C-p C-q` + - Various bugfixes and stability improvements + - Minor UI improvements + - Automatically create our own bridge interface 'docker0' - -- dotCloud Fri, 12 Apr 2013 12:20:06 -0700 + -- dotCloud Tue, 9 Apr 2013 00:00:00 -0700 -lxc-docker (0.1.0-1) unstable; urgency=low +lxc-docker (0.1.3-1) precise; urgency=low - * Initial release + - Choose TCP frontend port with '-p :PORT' + - Layer format is versioned + - Major reliability improvements to the process manager + - Various bugfixes and stability improvements - -- dotCloud Mon, 25 Mar 2013 05:51:12 -0700 + -- dotCloud Thu, 4 Apr 2013 00:00:00 -0700 + + +lxc-docker (0.1.2-1) precise; urgency=low + + - Set container hostname with 'docker run -h' + - Selective attach at run with 'docker run -a [stdin[,stdout[,stderr]]]' + - Various bugfixes and stability improvements + - UI polish + - Progress bar on push/pull + - Use XZ compression by default + - Make IP allocator lazy + + -- dotCloud Wed, 3 Apr 2013 00:00:00 -0700 + + +lxc-docker (0.1.1-1) precise; urgency=low + + - Display shorthand IDs for convenience + - Stabilize process management + - Layers can include a commit message + - Simplified 'docker attach' + - Fixed support for re-attaching + - Various bugfixes and stability improvements + - Auto-download at run + - Auto-login on push + - Beefed up documentation + + -- dotCloud Sun, 31 Mar 2013 00:00:00 -0700 + + +lxc-docker (0.1.0-1) precise; urgency=low + + - First release + - Implement registry in order to push/pull images + - TCP port allocation + - Fix termcaps on Linux + - Add documentation + - Add Vagrant support with Vagrantfile + - Add unit tests + - Add repository/tags to ease image management + - Improve the layer implementation + + -- dotCloud Sat, 23 Mar 2013 00:00:00 -0700 diff --git a/packaging/ubuntu/maintainer.ubuntu b/packaging/ubuntu/maintainer.ubuntu index 406498ebad..07ab0a1f0e 100644 --- a/packaging/ubuntu/maintainer.ubuntu +++ b/packaging/ubuntu/maintainer.ubuntu @@ -15,9 +15,12 @@ accessed adding the following line to /etc/apt/sources.list :: Releasing a new package ~~~~~~~~~~~~~~~~~~~~~~~ -The most relevant information to update is the changelog file: +The most relevant information to update is the packaging/ubuntu/changelog file: Each new release should create a new first paragraph with new release version, -changes, and the maintainer information. +changes, and the maintainer information. The core of this paragraph is +located on CHANGELOG.md. Make sure to transcribe it and translate the formats +(eg: packaging/ubuntu/changelog uses 2 spaces for body change descriptions +instead of 1 space from CHANGELOG.md) Assuming your PPA GPG signing key is on /media/usbdrive/docker.key, load it into the GPG_KEY environment variable with:: @@ -28,8 +31,9 @@ into the GPG_KEY environment variable with:: After this is done and you are ready to upload the package to the PPA, you have a couple of choices: -* Follow README.debian to generate the actual source packages and upload them - to the PPA +* Follow packaging/ubuntu/README.ubuntu to generate the actual source packages + and upload them to the PPA + * Let vagrant do all the work for you:: ( cd docker/packaging/ubuntu; vagrant up )