瀏覽代碼

Rewrite the mac and windows docs to use the boot2docker installers.

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
SvenDowideit 11 年之前
父節點
當前提交
5f5d66ade6

二進制
docs/sources/installation/images/osx-installer.png


二進制
docs/sources/installation/images/windows-boot2docker-start.png


二進制
docs/sources/installation/images/windows-installer.png


+ 46 - 150
docs/sources/installation/mac.md

@@ -13,174 +13,70 @@ page_keywords: Docker, Docker documentation, requirements, boot2docker, VirtualB
 > **Note:**
 > Docker is supported on Mac OS X 10.6 "Snow Leopard" or newer.
 
-Docker has two key components: the Docker daemon and the `docker` binary
-which acts as a client. The client passes instructions to the daemon
-which builds, runs and manages your Docker containers. As Docker uses
-some Linux-specific kernel features you can't use it directly on OS X.
-Instead we run the Docker daemon inside a lightweight virtual machine on your local
-OS X host. We can then use a native client `docker` binary to communicate
-with the Docker daemon inside our virtual machine. To make this process
-easier we've designed a helper application called
-[boot2docker](https://github.com/boot2docker/boot2docker) to install
-that virtual machine and run our Docker daemon.
-
-[boot2docker](https://github.com/boot2docker/boot2docker) uses
-VirtualBox to create the virtual machine so we'll need to install that
-first.
-
-## Installing VirtualBox
-
-Docker on OS X needs VirtualBox to run. To begin with, head over to
-[VirtualBox Download Page](https://www.virtualbox.org/wiki/Downloads)
-and get the tool for `OS X hosts x86/amd64`.
-
-Once the download is complete, open the disk image, run `VirtualBox.pkg`
-and install VirtualBox.
+The Docker Engine uses Linux-specific kernel features, so we run it on OS X
+using a lightweight virtual machine.  You can use the OS X Docker client to
+control the virtualized engine to build, run and manage Docker containers.
 
-> **Note**:
-> Do not simply copy the package without running the
-> installer.
-
-## Installing boot2docker manually
-
-### Downloading the boot2docker script
-
-[boot2docker](https://github.com/boot2docker/boot2docker) provides a
-handy script to manage the VM running the Docker daemon. It also takes
-care of the installation of that VM.
-
-Open up a new terminal window and run the following commands to get
-boot2docker:
-
-    # Enter the installation directory
-    $ mkdir -p ~/bin
-    $ cd ~/bin
-
-    # Get the file
-    $ curl https://raw.githubusercontent.com/boot2docker/boot2docker/master/boot2docker > boot2docker
-
-    # Mark it executable
-    $ chmod +x boot2docker
-
-### Installing the Docker OS X Client
-
-The Docker daemon is accessed using the `docker` binary.
-
-Run the following commands to get it downloaded and set up:
-
-    # Get the docker binary
-    $ DIR=$(mktemp -d ${TMPDIR:-/tmp}/dockerdl.XXXXXXX) && \
-      curl -f -o $DIR/ld.tgz https://get.docker.io/builds/Darwin/x86_64/docker-latest.tgz && \
-      gunzip $DIR/ld.tgz && \
-      tar xvf $DIR/ld.tar -C $DIR/ && \
-      cp $DIR/usr/local/bin/docker ./docker
-
-    # Copy the executable file
-    $ sudo mkdir -p /usr/local/bin
-    $ sudo cp docker /usr/local/bin/
-
-### Configure the Docker OS X Client
-
-The Docker client, `docker`, uses an environment variable `DOCKER_HOST`
-to specify the location of the Docker daemon to connect to. Specify your
-local boot2docker virtual machine as the value of that variable.
-
-    $ export DOCKER_HOST=tcp://127.0.0.1:4243
-
-## Installing boot2docker with Homebrew
+To make this process easier we designed a helper application called
+[boot2docker](https://github.com/boot2docker/boot2docker) to install the
+virtual machine and run the Docker daemon.
 
-If you are using Homebrew on your machine, simply run the following
-command to install `boot2docker`:
+## Installation
 
-    $ brew install boot2docker
+1. Download the latest release of the [Docker for OSX Installer](
+   https://github.com/boot2docker/osx-installer/releases)
+2. Run the installer, which will install VirtualBox and the Boot2Docker management
+   tool.
+   ![](/installation/images/osx-installer.png)
+3. Open a terminal and run:
 
-Run the following command to install the Docker client:
+```
+	boot2docker init
+	boot2docker start
+	export DOCKER_HOST=tcp://localhost:4243
+```
 
-    $ brew install docker
-
-And that's it! Let's check out how to use it.
-
-# How To Use Docker On Mac OS X
-
-## Running the Docker daemon via boot2docker
-
-Firstly we need to initialize our boot2docker virtual machine. Run the
-`boot2docker` command.
-
-    $ boot2docker init
-
-This will setup our initial virtual machine.
-
-Next we need to start the Docker daemon.
-
-    $ boot2docker up
-
-There are a variety of others commands available using the `boot2docker`
-script. You can see these like so:
-
-    $ boot2docker
-    Usage ./boot2docker {init|start|up|pause|stop|restart|status|info|delete|ssh|download}
-
-## The Docker client
-
-Once the virtual machine with the Docker daemon is up, you can use the `docker`
-binary just like any other application.
-
-    $ docker version
-    Client version: 0.10.0
-    Client API version: 1.10
-    Server version: 0.10.0
-    Server API version: 1.10
-    Last stable version: 0.10.0
-
-## Using Docker port forwarding with boot2docker
-
-In order to forward network ports from Docker with boot2docker we need to
-manually forward the port range Docker uses inside VirtualBox. To do
-this we take the port range that Docker uses by default with the `-P`
-option, ports 49000-49900, and run the following command.
-
-> **Note:**
-> The boot2docker virtual machine must be powered off for this
-> to work.
+`boot2docker init` will ask you to enter an ssh key passphrase - the simplest
+(but least secure) is to just hit [Enter]. This passphrase is used by the
+`boot2docker ssh` command.
 
-    for i in {49000..49900}; do
-     VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$i";
-     VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i";
-    done
 
-## Connecting to the VM via SSH
+Once you have an initialized virtual machine, you can `boot2docker stop` and 
+`boot2docker start` it.
 
-If you feel the need to connect to the VM, you can simply run:
+## Upgrading
 
-    $ boot2docker ssh
+To upgrade:
 
-    # User: docker
-    # Pwd:  tcuser
+1. Download the latest release of the [Docker for OSX Installer](
+   https://github.com/boot2docker/osx-installer/releases)
+2. Run the installer, which will update VirtualBox and the Boot2Docker management
+   tool.
+3. To upgrade your existing virtual machine, open a terminal and run:
 
-If SSH complains about keys then run:
+```
+	boot2docker stop
+	boot2docker download
+	boot2docker start
+```
 
-    $ ssh-keygen -R '[localhost]:2022'
 
-## Upgrading to a newer release of boot2docker
+## Running Docker
 
-To upgrade an initialized boot2docker virtual machine, you can use the
-following 3 commands. Your virtual machine's disk will not be changed,
-so you won't lose your images and containers:
+From your terminal, you can try the “hello world” example. Run:
 
-    $ boot2docker stop
-    $ boot2docker download
-    $ boot2docker start
+    $ docker run ubuntu echo hello world
 
-# Learn More
+This will download the ubuntu image and print hello world.
 
-## boot2docker
+# Further details
 
-See the GitHub page for
-[boot2docker](https://github.com/boot2docker/boot2docker).
+The Boot2Docker management tool provides some commands:
 
-# Next steps
+```
+$ ./boot2docker
+Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
+```
 
-You can now continue with the [*Hello
-World*](/examples/hello_world/#hello-world) example.
 
+For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io).

+ 40 - 59
docs/sources/installation/windows.md

@@ -1,56 +1,57 @@
 page_title: Installation on Windows
-page_description: Please note this project is currently under heavy development. It should not be used in production.
+page_description: Docker installation on Microsoft Windows
 page_keywords: Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker
 
 # Windows
 
-Docker can run on Windows using a virtualization platform like
-VirtualBox. A Linux distribution is run inside a virtual machine and
-that's where Docker will run.
-
-## Installation
-
 > **Note**:
 > Docker is still under heavy development! We don't recommend using it in
 > production yet, but we're getting closer with each release. Please see
 > our blog post, [Getting to Docker 1.0](
 > http://blog.docker.io/2013/08/getting-to-docker-1-0/)
 
-1. Install virtualbox from [https://www.virtualbox.org](
-   https://www.virtualbox.org) - or follow this [tutorial](
-   http://www.slideshare.net/julienbarbier42/install-virtualbox-on-windows-7).
-2. Download the latest boot2docker.iso from
-   [https://github.com/boot2docker/boot2docker/releases](
-   https://github.com/boot2docker/boot2docker/releases).
-3. Start VirtualBox.
-4. Create a new Virtual machine with the following settings:
+Docker Engine runs on Windows using a lightweight virtual machine. There
+is no native Windows Docker client yet, so everything is done inside the virtual
+machine.
+
+To make this process easier we designed a helper application called
+[boot2docker](https://github.com/boot2docker/boot2docker) to install the
+virtual machine and run the Docker daemon.
+
 
-        - Name: boot2docker
-        - Type: Linux
-        - Version: Linux 2.6 (64 bit)
-        - Memory size: 1024 MB
-        - Hard drive: Do not add a virtual hard drive
+## Installation
 
-5. Open the settings of the virtual machine:
+1. Download the latest release of the [Docker for Windows Installer](https://github.com/boot2docker/windows-installer/releases)
+2. Run the installer, which will install VirtualBox, MSYS-git, the boot2docker Linux ISO and the
+   Boot2Docker management tool.
+   ![](/installation/images/windows-installer.png)
+3. Run the `Boot2Docker Start` shell script from your Desktop or Program Files > Docker.
+   The Start script will ask you to enter an ssh key passphrase - the simplest
+   (but least secure) is to just hit [Enter].
+   ![](/installation/images/windows-boot2docker-start.png)
 
-    5.1. go to Storage
-    5.2. click the empty slot below Controller: IDE
-    5.3. click the disc icon on the right of IDE Secondary Master
-    5.4. click Choose a virtual CD/DVD disk file
+The `Boot2Docker Start` script will connect you to a shell session in the virtual
+Machine. If needed, it will initialise a new VM and start it.
 
-6. Browse to the path where you`ve saved the boot2docker.iso, select
-   the boot2docker.iso and click open.
+## Upgrading
 
-7. Click OK on the Settings dialog to save the changes and close the
-   window.
+To upgrade:
 
-8. Start the virtual machine by clicking the green start button.
+1. Download the latest release of the [Docker for Windows Installer](
+   https://github.com/boot2docker/windows-installer/releases)
+2. Run the installer, which will update the Boot2Docker management tool.
+3. To upgrade your existing virtual machine, open a terminal and run:
+    
+```
+        boot2docker stop
+        boot2docker download
+        boot2docker start
+```
 
-9. The boot2docker virtual machine should boot now.
 
 ## Running Docker
 
-boot2docker will log you in automatically so you can start using Docker
+Boot2Docker will log you in automatically so you can start using Docker
 right away.
 
 Let's try the “hello world” example. Run
@@ -59,34 +60,14 @@ Let's try the “hello world” example. Run
 
 This will download the small busybox image and print hello world.
 
-## Persistent storage
-
-1. Add a virtual hard drive to the VM created in Installation
-2. Start the VM
-3. Create an empty partition on the attached virtual hard drive
-
-    ```sh
-    sudo fdisk /dev/sda
-    n (new partition)
-    p (primary partition)
-    1 (partition 1)
-    w (write changes to disk)
-    ```
-
-4. Format the partition using ext4 
-
-    ```sh
-    mkfs.ext4 -L boot2docker-data /dev/sda1
-    ```
+# Further Details
 
-5. Reboot
+The Boot2Docker management tool provides some commands:
 
-    ```sh
-    sudo reboot
-    ```
+```
+$ ./boot2docker
+Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
+```
 
-6. boot2docker should now auto mount the partition and persist data there. (/var/lib/docker linking to /mnt/sda1/var/lib/docker)
 
-    ```sh
-    ls -l /var/lib
-    ```
+For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io)