Initial commit
208
vendor/github.com/hyperhq/hypercli/docs/installation/binaries.md
generated
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation from binaries"
|
||||
description = "Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments."
|
||||
keywords = ["binaries, installation, docker, documentation, linux"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight = 110
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Binaries
|
||||
|
||||
**This instruction set is meant for hackers who want to try out Docker
|
||||
on a variety of environments.**
|
||||
|
||||
Before following these directions, you should really check if a packaged
|
||||
version of Docker is already available for your distribution. We have
|
||||
packages for many distributions, and more keep showing up all the time!
|
||||
|
||||
## Check runtime dependencies
|
||||
|
||||
To run properly, docker needs the following software to be installed at
|
||||
runtime:
|
||||
|
||||
- iptables version 1.4 or later
|
||||
- Git version 1.7 or later
|
||||
- procps (or similar provider of a "ps" executable)
|
||||
- XZ Utils 4.9 or later
|
||||
- a [properly mounted](
|
||||
https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount)
|
||||
cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount
|
||||
point [is](https://github.com/docker/docker/issues/2683)
|
||||
[not](https://github.com/docker/docker/issues/3485)
|
||||
[sufficient](https://github.com/docker/docker/issues/4568))
|
||||
|
||||
## Check kernel dependencies
|
||||
|
||||
Docker in daemon mode has specific kernel requirements. For details,
|
||||
check your distribution in [*Installation*](index.md#on-linux).
|
||||
|
||||
A 3.10 Linux kernel is the minimum requirement for Docker.
|
||||
Kernels older than 3.10 lack some of the features required to run Docker
|
||||
containers. These older versions are known to have bugs which cause data loss
|
||||
and frequently panic under certain conditions.
|
||||
|
||||
The latest minor version (3.x.y) of the 3.10 (or a newer maintained version)
|
||||
Linux kernel is recommended. Keeping the kernel up to date with the latest
|
||||
minor version will ensure critical kernel bugs get fixed.
|
||||
|
||||
> **Warning**:
|
||||
> Installing custom kernels and kernel packages is probably not
|
||||
> supported by your Linux distribution's vendor. Please make sure to
|
||||
> ask your vendor about Docker support first before attempting to
|
||||
> install custom kernels on your distribution.
|
||||
|
||||
> **Warning**:
|
||||
> Installing a newer kernel might not be enough for some distributions
|
||||
> which provide packages which are too old or incompatible with
|
||||
> newer kernels.
|
||||
|
||||
Note that Docker also has a client mode, which can run on virtually any
|
||||
Linux kernel (it even builds on OS X!).
|
||||
|
||||
## Enable AppArmor and SELinux when possible
|
||||
|
||||
Please use AppArmor or SELinux if your Linux distribution supports
|
||||
either of the two. This helps improve security and blocks certain
|
||||
types of exploits. Your distribution's documentation should provide
|
||||
detailed steps on how to enable the recommended security mechanism.
|
||||
|
||||
Some Linux distributions enable AppArmor or SELinux by default and
|
||||
they run a kernel which doesn't meet the minimum requirements (3.10
|
||||
or newer). Updating the kernel to 3.10 or newer on such a system
|
||||
might not be enough to start Docker and run containers.
|
||||
Incompatibilities between the version of AppArmor/SELinux user
|
||||
space utilities provided by the system and the kernel could prevent
|
||||
Docker from running, from starting containers or, cause containers to
|
||||
exhibit unexpected behaviour.
|
||||
|
||||
> **Warning**:
|
||||
> If either of the security mechanisms is enabled, it should not be
|
||||
> disabled to make Docker or its containers run. This will reduce
|
||||
> security in that environment, lose support from the distribution's
|
||||
> vendor for the system, and might break regulations and security
|
||||
> policies in heavily regulated environments.
|
||||
|
||||
## Get the Docker binary
|
||||
|
||||
You can download either the latest release binary or a specific version.
|
||||
After downloading a binary file, you must set the file's execute bit to run it.
|
||||
|
||||
To set the file's execute bit on Linux and OS X:
|
||||
|
||||
$ chmod +x docker
|
||||
|
||||
To get the list of stable release version numbers from GitHub, view the
|
||||
`docker/docker` [releases page](https://github.com/docker/docker/releases).
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> 1) You can get the MD5 and SHA256 hashes by appending .md5 and .sha256 to the URLs respectively
|
||||
>
|
||||
> 2) You can get the compressed binaries by appending .tgz to the URLs
|
||||
|
||||
### Get the Linux binary
|
||||
|
||||
To download the latest version for Linux, use the
|
||||
following URLs:
|
||||
|
||||
https://get.docker.com/builds/Linux/i386/docker-latest
|
||||
|
||||
https://get.docker.com/builds/Linux/x86_64/docker-latest
|
||||
|
||||
To download a specific version for Linux, use the
|
||||
following URL patterns:
|
||||
|
||||
https://get.docker.com/builds/Linux/i386/docker-<version>
|
||||
|
||||
https://get.docker.com/builds/Linux/x86_64/docker-<version>
|
||||
|
||||
For example:
|
||||
|
||||
https://get.docker.com/builds/Linux/i386/docker-1.9.1
|
||||
|
||||
https://get.docker.com/builds/Linux/x86_64/docker-1.9.1
|
||||
|
||||
|
||||
### Get the Mac OS X binary
|
||||
|
||||
The Mac OS X binary is only a client. You cannot use it to run the `docker`
|
||||
daemon. To download the latest version for Mac OS X, use the following URLs:
|
||||
|
||||
https://get.docker.com/builds/Darwin/x86_64/docker-latest
|
||||
|
||||
To download a specific version for Mac OS X, use the
|
||||
following URL patterns:
|
||||
|
||||
https://get.docker.com/builds/Darwin/x86_64/docker-<version>
|
||||
|
||||
For example:
|
||||
|
||||
https://get.docker.com/builds/Darwin/x86_64/docker-1.9.1
|
||||
|
||||
### Get the Windows binary
|
||||
|
||||
You can only download the Windows client binary for version `1.9.1` onwards.
|
||||
Moreover, the binary is only a client, you cannot use it to run the `docker` daemon.
|
||||
To download the latest version for Windows, use the following URLs:
|
||||
|
||||
https://get.docker.com/builds/Windows/i386/docker-latest.exe
|
||||
|
||||
https://get.docker.com/builds/Windows/x86_64/docker-latest.exe
|
||||
|
||||
To download a specific version for Windows, use the following URL pattern:
|
||||
|
||||
https://get.docker.com/builds/Windows/i386/docker-<version>.exe
|
||||
|
||||
https://get.docker.com/builds/Windows/x86_64/docker-<version>.exe
|
||||
|
||||
For example:
|
||||
|
||||
https://get.docker.com/builds/Windows/i386/docker-1.9.1.exe
|
||||
|
||||
https://get.docker.com/builds/Windows/x86_64/docker-1.9.1.exe
|
||||
|
||||
|
||||
## Run the Docker daemon
|
||||
|
||||
# start the docker in daemon mode from the directory you unpacked
|
||||
$ sudo ./docker daemon &
|
||||
|
||||
## Giving non-root access
|
||||
|
||||
The `docker` daemon always runs as the root user, and the `docker`
|
||||
daemon binds to a Unix socket instead of a TCP port. By default that
|
||||
Unix socket is owned by the user *root*, and so, by default, you can
|
||||
access it with `sudo`.
|
||||
|
||||
If you (or your Docker installer) create a Unix group called *docker*
|
||||
and add users to it, then the `docker` daemon will make the ownership of
|
||||
the Unix socket read/writable by the *docker* group when the daemon
|
||||
starts. The `docker` daemon must always run as the root user, but if you
|
||||
run the `docker` client as a user in the *docker* group then you don't
|
||||
need to add `sudo` to all the client commands.
|
||||
|
||||
> **Warning**:
|
||||
> The *docker* group (or the group specified with `-G`) is root-equivalent;
|
||||
> see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
|
||||
|
||||
## Upgrades
|
||||
|
||||
To upgrade your manual installation of Docker, first kill the docker
|
||||
daemon:
|
||||
|
||||
$ killall docker
|
||||
|
||||
Then follow the regular installation steps.
|
||||
|
||||
## Run your first container!
|
||||
|
||||
# check your docker version
|
||||
$ sudo ./docker version
|
||||
|
||||
# run a container and open an interactive shell in the container
|
||||
$ sudo ./docker run -i -t ubuntu /bin/bash
|
||||
|
||||
Continue with the [User Guide](../userguide/index.md).
|
||||
204
vendor/github.com/hyperhq/hypercli/docs/installation/cloud/cloud-ex-aws.md
generated
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Example: Manual install on a cloud provider"
|
||||
description = "Example of a manual install of Docker Engine on a cloud provider, using Amazon Web Services (AWS) EC2. Shows how to create an EC2 instance, and install Docker Engine on it."
|
||||
keywords = ["cloud, docker, machine, documentation, installation, AWS, EC2"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Example: Manual install on a cloud provider
|
||||
|
||||
You can install Docker Engine directly to servers you have on cloud providers. This example shows how to create an <a href="https://aws.amazon.com/" target="_blank"> Amazon Web Services (AWS)</a> EC2 instance, and install Docker Engine on it.
|
||||
|
||||
You can use this same general approach to create Dockerized hosts on other cloud providers.
|
||||
|
||||
### Step 1. Sign up for AWS
|
||||
|
||||
1. If you are not already an AWS user, sign up for <a href="https://aws.amazon.com/" target="_blank"> AWS</a> to create an account and get root access to EC2 cloud computers. If you have an Amazon account, you can use it as your root user account.
|
||||
|
||||
2. Create an IAM (Identity and Access Management) administrator user, an admin group, and a key pair associated with a region.
|
||||
|
||||
From the AWS menus, select **Services** > **IAM** to get started.
|
||||
|
||||
See the AWS documentation on <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html" target="_blank">Setting Up with Amazon EC2</a>. Follow the steps for "Create an IAM User" and "Create a Key Pair".
|
||||
|
||||
If you are just getting started with AWS and EC2, you do not need to create a virtual private cloud (VPC) or specify a subnet. The newer EC2-VPC platform (accounts created after 2013-12-04) comes with a default VPC and subnet in each availability zone. When you launch an instance, it automatically uses the default VPC.
|
||||
|
||||
### Step 2. Configure and start an EC2 instance
|
||||
|
||||
Launch an instance to create a virtual machine (VM) with a specified operating system (OS) as follows.
|
||||
|
||||
1. Log into AWS with your IAM credentials.
|
||||
|
||||
On the AWS home page, click **EC2** to go to the dashboard, then click **Launch Instance**.
|
||||
|
||||

|
||||
|
||||
AWS EC2 virtual servers are called *instances* in Amazon parlance. Once you set up an account, IAM user and key pair, you are ready to launch an instance. It is at this point that you select the OS for the VM.
|
||||
|
||||
2. Choose an Amazon Machine Image (AMI) with the OS and applications you want. For this example, we select an Ubuntu server.
|
||||
|
||||

|
||||
|
||||
3. Choose an instance type.
|
||||
|
||||

|
||||
|
||||
4. Configure the instance.
|
||||
|
||||
You can select the default network and subnet, which are inherently linked to a region and availability zone.
|
||||
|
||||

|
||||
|
||||
5. Click **Review and Launch**.
|
||||
|
||||
6. Select a key pair to use for this instance.
|
||||
|
||||
When you choose to launch, you need to select a key pair to use. Save the `.pem` file to use in the next steps.
|
||||
|
||||
The instance is now up-and-running. The menu path to get back to your EC2 instance on AWS is: **EC2 (Virtual Servers in Cloud)** > **EC2 Dashboard** > **Resources** > **Running instances**.
|
||||
|
||||
To get help with your private key file, instance IP address, and how to log into the instance via SSH, click the **Connect** button at the top of the AWS instance dashboard.
|
||||
|
||||
|
||||
### Step 3. Log in from a terminal, configure apt, and get packages
|
||||
|
||||
1. Log in to the EC2 instance from a command line terminal.
|
||||
|
||||
Change directories into the directory containing the SSH key and run this command (or give the path to it as part of the command):
|
||||
|
||||
$ ssh -i "YourKey" ubuntu@xx.xxx.xxx.xxx
|
||||
|
||||
For our example:
|
||||
|
||||
$ cd ~/Desktop/keys/amazon_ec2
|
||||
$ ssh -i "my-key-pair.pem" ubuntu@xx.xxx.xxx.xxx
|
||||
|
||||
We'll follow the instructions for installing Docker on Ubuntu at https://docs.docker.com/engine/installation/ubuntulinux/. The next few steps reflect those instructions.
|
||||
|
||||
2. Check the kernel version to make sure it's 3.10 or higher.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ uname -r
|
||||
3.13.0-48-generic
|
||||
|
||||
3. Add the new `gpg` key.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.jNZLKNnKte --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net
|
||||
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
|
||||
gpg: Total number processed: 1
|
||||
gpg: imported: 1 (RSA: 1)
|
||||
|
||||
4. Create a `docker.list` file, and add an entry for our OS, Ubuntu Trusty 14.04 (LTS).
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo vi /etc/apt/sources.list.d/docker.list
|
||||
|
||||
If we were updating an existing file, we'd delete any existing entries.
|
||||
|
||||
5. Update the `apt` package index.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-get update
|
||||
|
||||
6. Purge the old repo if it exists.
|
||||
|
||||
In our case the repo doesn't because this is a new VM, but let's run it anyway just to be sure.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-get purge lxc-docker
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
Package 'lxc-docker' is not installed, so not removed
|
||||
0 upgraded, 0 newly installed, 0 to remove and 139 not upgraded.
|
||||
|
||||
7. Verify that `apt` is pulling from the correct repository.
|
||||
|
||||
ubuntu@ip-172-31-0-151:~$ sudo apt-cache policy docker-engine
|
||||
docker-engine:
|
||||
Installed: (none)
|
||||
Candidate: 1.9.1-0~trusty
|
||||
Version table:
|
||||
1.9.1-0~trusty 0
|
||||
500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
|
||||
1.9.0-0~trusty 0
|
||||
500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
|
||||
. . .
|
||||
|
||||
From now on when you run `apt-get upgrade`, `apt` pulls from the new repository.
|
||||
|
||||
### Step 4. Install recommended prerequisites for the OS
|
||||
|
||||
For Ubuntu Trusty (and some other versions), it’s recommended to install the `linux-image-extra` kernel package, which allows you use the `aufs` storage driver, so we'll do that now.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-get update
|
||||
ubuntu@ip-172-31-0-151:~$ sudo apt-get install linux-image-extra-$(uname -r)
|
||||
|
||||
### Step 5. Install Docker Engine on the remote instance
|
||||
|
||||
1. Update the apt package index.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-get update
|
||||
|
||||
2. Install Docker Engine.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo apt-get install docker-engine
|
||||
Reading package lists... Done
|
||||
Building dependency tree
|
||||
Reading state information... Done
|
||||
The following extra packages will be installed:
|
||||
aufs-tools cgroup-lite git git-man liberror-perl
|
||||
Suggested packages:
|
||||
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
|
||||
gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
|
||||
The following NEW packages will be installed:
|
||||
aufs-tools cgroup-lite docker-engine git git-man liberror-perl
|
||||
0 upgraded, 6 newly installed, 0 to remove and 139 not upgraded.
|
||||
Need to get 11.0 MB of archives.
|
||||
After this operation, 60.3 MB of additional disk space will be used.
|
||||
Do you want to continue? [Y/n] y
|
||||
Get:1 http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe aufs-tools amd64 1:3.2+20130722-1.1 [92.3 kB]
|
||||
Get:2 http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]
|
||||
. . .
|
||||
|
||||
3. Start the Docker daemon.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo service docker start
|
||||
|
||||
4. Verify Docker Engine is installed correctly by running `docker run hello-world`.
|
||||
|
||||
ubuntu@ip-xxx-xx-x-xxx:~$ sudo docker run hello-world
|
||||
ubuntu@ip-172-31-0-151:~$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from library/hello-world
|
||||
b901d36b6f2f: Pull complete
|
||||
0a6ba66e537a: Pull complete
|
||||
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
Share images, automate workflows, and more with a free Docker Hub account:
|
||||
https://hub.docker.com
|
||||
|
||||
For more examples and ideas, visit:
|
||||
https://docs.docker.com/userguide/
|
||||
|
||||
## Where to go next
|
||||
|
||||
* Would you like a quicker way to do Docker cloud installs? See [Digital Ocean Example: Use Docker Machine to provision Docker on cloud hosts](cloud-ex-aws.md).
|
||||
|
||||
* To learn more about options for installing Docker Engine on cloud providers, see [Understand cloud install options and choose one](cloud.md).
|
||||
|
||||
* To get started with Docker, see <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide </a>.
|
||||
227
vendor/github.com/hyperhq/hypercli/docs/installation/cloud/cloud-ex-machine-ocean.md
generated
vendored
Normal file
@@ -0,0 +1,227 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Example: Use Docker Machine to provision cloud hosts"
|
||||
description = "Example of using Docker Machine to install Docker Engine on a cloud provider, using Digital Ocean."
|
||||
keywords = ["cloud, docker, machine, documentation, installation, digitalocean"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Example: Use Docker Machine to provision cloud hosts
|
||||
|
||||
Docker Machine driver plugins are available for many cloud platforms, so you can use Machine to provision cloud hosts. When you use Docker Machine for provisioning, you create cloud hosts with Docker Engine installed on them.
|
||||
|
||||
You'll need to install and run Docker Machine, and create an account with the cloud provider.
|
||||
|
||||
Then you provide account verification, security credentials, and configuration options for the providers as flags to `docker-machine create`. The flags are unique for each cloud-specific driver. For instance, to pass a Digital Ocean access token you use the `--digitalocean-access-token` flag.
|
||||
|
||||
As an example, let's take a look at how to create a Dockerized <a href="https://digitalocean.com" target="_blank">Digital Ocean</a> _Droplet_ (cloud server).
|
||||
|
||||
### Step 1. Create a Digital Ocean account and log in
|
||||
|
||||
If you have not done so already, go to <a href="https://digitalocean.com" target="_blank">Digital Ocean</a>, create an account, and log in.
|
||||
|
||||
### Step 2. Generate a personal access token
|
||||
|
||||
To generate your access token:
|
||||
|
||||
1. Go to the Digital Ocean administrator console and click **API** in the header.
|
||||
|
||||

|
||||
|
||||
2. Click **Generate New Token** to get to the token generator.
|
||||
|
||||

|
||||
|
||||
3. Give the token a clever name (e.g. "machine"), make sure the **Write (Optional)** checkbox is checked, and click **Generate Token**.
|
||||
|
||||

|
||||
|
||||
4. Grab (copy to clipboard) the generated big long hex string and store it somewhere safe.
|
||||
|
||||

|
||||
|
||||
This is the personal access token you'll use in the next step to create your cloud server.
|
||||
|
||||
### Step 3. Start Docker Machine
|
||||
|
||||
1. If you have not done so already, install Docker Machine on your local host.
|
||||
|
||||
* <a href="https://docs.docker.com/engine/installation/mac/" target="_blank"> How to install Docker Machine on Mac OS X</a>
|
||||
|
||||
* <a href="https://docs.docker.com/engine/installation/windows/" target="_blank">How to install Docker Machine on Windows</a>
|
||||
|
||||
* <a href="https://docs.docker.com/machine/install-machine/" target="_blank">Install Docker Machine directly</a> (e.g., on Linux)
|
||||
|
||||
2. At a command terminal, use `docker-machine ls` to get a list of Docker Machines and their status.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default - virtualbox Stopped
|
||||
|
||||
3. If Machine is stopped, start it.
|
||||
|
||||
$ docker-machine start default
|
||||
(default) OUT | Starting VM...
|
||||
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
|
||||
|
||||
4. Set environment variables to connect your shell to the local VM.
|
||||
|
||||
$ docker-machine env default
|
||||
export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://xxx.xxx.xx.xxx:xxxx"
|
||||
export DOCKER_CERT_PATH="/Users/londoncalling/.docker/machine/machines/default"
|
||||
export DOCKER_MACHINE_NAME="default"
|
||||
# Run this command to configure your shell:
|
||||
# eval "$(docker-machine env default)"
|
||||
|
||||
eval "$(docker-machine env default)"
|
||||
|
||||
5. Re-run `docker-machine ls` to check that it's now running.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp:////xxx.xxx.xx.xxx:xxxx
|
||||
|
||||
6. Run some Docker commands to make sure that Docker Engine is also up-and-running.
|
||||
|
||||
We'll run `docker run hello-world` again, but you could try `docker ps`, `docker run docker/whalesay cowsay boo`, or another command to verify that Docker is running.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com
|
||||
|
||||
For more examples and ideas, visit:
|
||||
https://docs.docker.com/userguide/
|
||||
|
||||
### Step 4. Use Docker Machine to Create the Droplet
|
||||
|
||||
1. Run `docker-machine create` with the `digitalocean` driver and pass your key to the `--digitalocean-access-token` flag, along with a name for the new cloud server.
|
||||
|
||||
For this example, we'll call our new Droplet "docker-sandbox".
|
||||
|
||||
$ docker-machine create --driver digitalocean --digitalocean-access-token 455275108641c7716462d6f35d08b76b246b6b6151a816cf75de63c5ef918872 docker-sandbox
|
||||
Running pre-create checks...
|
||||
Creating machine...
|
||||
(docker-sandbox) OUT | Creating SSH key...
|
||||
(docker-sandbox) OUT | Creating Digital Ocean droplet...
|
||||
(docker-sandbox) OUT | Waiting for IP address to be assigned to the Droplet...
|
||||
Waiting for machine to be running, this may take a few minutes...
|
||||
Machine is running, waiting for SSH to be available...
|
||||
Detecting operating system of created instance...
|
||||
Detecting the provisioner...
|
||||
Provisioning created instance...
|
||||
Copying certs to the local machine directory...
|
||||
Copying certs to the remote machine...
|
||||
Setting Docker configuration on the remote daemon...
|
||||
To see how to connect Docker to this machine, run: docker-machine env docker-sandbox
|
||||
|
||||
When the Droplet is created, Docker generates a unique SSH key and stores it on your local system in `~/.docker/machines`. Initially, this is used to provision the host. Later, it's used under the hood to access the Droplet directly with the `docker-machine ssh` command. Docker Engine is installed on the cloud server and the daemon is configured to accept remote connections over TCP using TLS for authentication.
|
||||
|
||||
2. Go to the Digital Ocean console to view the new Droplet.
|
||||
|
||||

|
||||
|
||||
3. At the command terminal, run `docker-machine ls`.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox - digitalocean Running tcp://45.55.139.48:2376
|
||||
|
||||
Notice that the new cloud server is running but is not the active host. Our command shell is still connected to the default machine, which is currently the active host as indicated by the asterisk (*).
|
||||
|
||||
4. Run `docker-machine env docker-sandbox` to get the environment commands for the new remote host, then run `eval` as directed to re-configure the shell to connect to `docker-sandbox`.
|
||||
|
||||
$ docker-machine env docker-sandbox
|
||||
export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://45.55.222.72:2376"
|
||||
export DOCKER_CERT_PATH="/Users/victoriabialas/.docker/machine/machines/docker-sandbox"
|
||||
export DOCKER_MACHINE_NAME="docker-sandbox"
|
||||
# Run this command to configure your shell:
|
||||
# eval "$(docker-machine env docker-sandbox)"
|
||||
|
||||
$ eval "$(docker-machine env docker-sandbox)"
|
||||
|
||||
5. Re-run `docker-machine ls` to verify that our new server is the active machine, as indicated by the asterisk (*) in the ACTIVE column.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default - virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox * digitalocean Running tcp://45.55.222.72:2376
|
||||
|
||||
6. Log in to the Droplet with the `docker-machine ssh` command.
|
||||
|
||||
$ docker-machine ssh docker-sandbox
|
||||
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-71-generic x86_64)
|
||||
|
||||
* Documentation: https://help.ubuntu.com/
|
||||
|
||||
System information as of Mon Dec 21 21:38:53 EST 2015
|
||||
|
||||
System load: 0.77 Processes: 70
|
||||
Usage of /: 11.4% of 19.56GB Users logged in: 0
|
||||
Memory usage: 15% IP address for eth0: 45.55.139.48
|
||||
Swap usage: 0% IP address for docker0: 172.17.0.1
|
||||
|
||||
Graph this data and manage this system at:
|
||||
https://landscape.canonical.com/
|
||||
|
||||
7. Verify Docker Engine is installed correctly by running `docker run hello-world`.
|
||||
|
||||
ubuntu@ip-172-31-0-151:~$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from library/hello-world
|
||||
b901d36b6f2f: Pull complete
|
||||
0a6ba66e537a: Pull complete
|
||||
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
. . .
|
||||
|
||||
You can type keyboard command Control-D or `exit` to log out of the remote server.
|
||||
|
||||
#### Understand the defaults and options on the create command
|
||||
|
||||
For convenience, `docker-machine` will use sensible defaults for choosing settings such as the image that the server is based on, but you override the defaults using the respective flags (e.g. `--digitalocean-image`). This is useful if, for example, you want to create a cloud server with a lot of memory and CPUs (by default `docker-machine` creates a small server). For a full list of the flags/settings available and their defaults, see the output of `docker-machine create -h` at the command line. See also <a href="https://docs.docker.com/machine/drivers/os-base/" target="_blank">Driver options and operating system defaults</a> and information about the <a href="https://docs.docker.com/machine/reference/create/" target="_blank">create</a> command in the Docker Machine documentation.
|
||||
|
||||
|
||||
### Step 5. Use Docker Machine to remove the Droplet
|
||||
|
||||
To remove a host and all of its containers and images, first stop the machine, then use `docker-machine rm`:
|
||||
|
||||
$ docker-machine stop docker-sandbox
|
||||
$ docker-machine rm docker-sandbox
|
||||
Do you really want to remove "docker-sandbox"? (y/n): y
|
||||
Successfully removed docker-sandbox
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp:////xxx.xxx.xx.xxx:xxxx
|
||||
|
||||
If you monitor the Digital Ocean console while you run these commands, you will see it update first to reflect that the Droplet was stopped, and then removed.
|
||||
|
||||
If you create a host with Docker Machine, but remove it through the cloud provider console, Machine will lose track of the server status. So please use the `docker-machine rm` command for hosts you create with `docker-machine --create`.
|
||||
|
||||
## Where to go next
|
||||
|
||||
* To learn more about options for installing Docker Engine on cloud providers, see [Understand cloud install options and choose one](cloud.md).
|
||||
|
||||
* To learn more about using Docker Machine to provision cloud hosts, see <a href="https://docs.docker.com/machine/get-started-cloud/" target="_blank">Using Docker Machine with a cloud provider</a>.
|
||||
|
||||
* To get started with Docker, see <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide</a>.
|
||||
53
vendor/github.com/hyperhq/hypercli/docs/installation/cloud/cloud.md
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Choose how to install"
|
||||
description = "Installation instructions for Docker on cloud."
|
||||
keywords = ["cloud, docker, machine, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Understand cloud install options and choose one
|
||||
|
||||
You can install Docker Engine on any cloud platform that runs an operating system (OS) that Docker supports. This includes many flavors and versions of Linux, along with Mac and Windows.
|
||||
|
||||
You have two options for installing:
|
||||
|
||||
* Manually install on the cloud (create cloud hosts, then install Docker Engine on them)
|
||||
* Use Docker Machine to provision cloud hosts
|
||||
|
||||
## Manually install Docker Engine on a cloud host
|
||||
|
||||
To install on a cloud provider:
|
||||
|
||||
1. Create an account with the cloud provider, and read cloud provider documentation to understand their process for creating hosts.
|
||||
|
||||
2. Decide which OS you want to run on the cloud host.
|
||||
|
||||
3. Understand the Docker prerequisites and install process for the chosen OS. See [Install Docker Engine](index.md) for a list of supported systems and links to the install guides.
|
||||
|
||||
4. Create a host with a Docker supported OS, and install Docker per the instructions for that OS.
|
||||
|
||||
[Example: Manual install on a cloud provider](cloud-ex-aws.md) shows how to create an <a href="https://aws.amazon.com/" target="_blank"> Amazon Web Services (AWS)</a> EC2 instance, and install Docker Engine on it.
|
||||
|
||||
|
||||
## Use Docker Machine to provision cloud hosts
|
||||
|
||||
Docker Machine driver plugins are available for several popular cloud platforms, so you can use Machine to provision one or more Dockerized hosts on those platforms.
|
||||
|
||||
With Docker Machine, you can use the same interface to create cloud hosts with Docker Engine on them, each configured per the options you specify.
|
||||
|
||||
To do this, you use the `docker-machine create` command with the driver for the cloud provider, and provider-specific flags for account verification, security credentials, and other configuration details.
|
||||
|
||||
[Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) walks you through the steps to set up Docker Machine and provision a Dockerized host on [Digital Ocean](https://www.digitalocean.com/).
|
||||
|
||||
## Where to go next
|
||||
* [Example: Manual install on a cloud provider](cloud-ex-aws.md) (AWS EC2)
|
||||
|
||||
* [Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md) (Digital Ocean)
|
||||
|
||||
* [Using Docker Machine with a cloud provider](https://docs.docker.com/machine/get-started-cloud/)
|
||||
|
||||
* <a href="https://docs.docker.com/engine/userguide/" target="_blank"> Docker User Guide </a> (after your install is complete, get started using Docker)
|
||||
25
vendor/github.com/hyperhq/hypercli/docs/installation/cloud/index.md
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/installation/amazon/",
|
||||
"/engine/installation/google/",
|
||||
"/engine/installation/softlayer/",
|
||||
"/engine/installation/azure/",
|
||||
"/engine/installation/rackspace/",
|
||||
"/engine/installation/joyent/"
|
||||
]
|
||||
title = "In the cloud"
|
||||
description = "Cloud Installations"
|
||||
keywords = ["Docker install "]
|
||||
[menu.main]
|
||||
identifier = "install_cloud"
|
||||
parent="engine_install"
|
||||
weight="-60"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Engine in the cloud
|
||||
|
||||
* [Understand cloud install options and choose one](cloud.md)
|
||||
* [Example: Use Docker Machine to provision cloud hosts](cloud-ex-machine-ocean.md)
|
||||
* [Example: Manual install on a cloud provider](cloud-ex-aws.md)
|
||||
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/bad_host.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/cool_view.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ec2-ubuntu.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ec2_instance_details.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ec2_instance_type.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ec2_launch_instance.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/good_host.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/kitematic.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 14 KiB |
1195
vendor/github.com/hyperhq/hypercli/docs/installation/images/linux_docker_host.svg
generated
vendored
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac-page-finished.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac-page-two.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac-password-prompt.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac-success.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac-welcome-page.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 152 KiB |
1243
vendor/github.com/hyperhq/hypercli/docs/installation/images/mac_docker_host.svg
generated
vendored
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/my-docker-vm.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/newsite_view.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_click_api.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_droplet.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_droplet_ubuntu.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_gen_token.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_save_token.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/ocean_token_create.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/virtualization.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/win-page-6.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/win-welcome.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 92 KiB |
1259
vendor/github.com/hyperhq/hypercli/docs/installation/images/win_docker_host.svg
generated
vendored
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/win_ver.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/windows-boot2docker-cmd.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/windows-boot2docker-powershell.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/windows-boot2docker-start.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
vendor/github.com/hyperhq/hypercli/docs/installation/images/windows-finish.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 117 KiB |
48
vendor/github.com/hyperhq/hypercli/docs/installation/index.md
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Install"
|
||||
description = "Lists the installation methods"
|
||||
keywords = ["Docker install "]
|
||||
[menu.main]
|
||||
identifier = "engine_install"
|
||||
parent="engine_use"
|
||||
weight="-81"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Docker Engine
|
||||
|
||||
Docker Engine is supported on Linux, Cloud, Windows, and OS X. Installation instructions are available for the following:
|
||||
|
||||
## On Linux
|
||||
* [Arch Linux](linux/archlinux.md)
|
||||
* [CentOS](linux/centos.md)
|
||||
* [CRUX Linux](linux/cruxlinux.md)
|
||||
* [Debian](linux/debian.md)
|
||||
* [Fedora](linux/fedora.md)
|
||||
* [FrugalWare](linux/frugalware.md)
|
||||
* [Gentoo](linux/gentoolinux.md)
|
||||
* [Oracle Linux](linux/oracle.md)
|
||||
* [Red Hat Enterprise Linux](linux/rhel.md)
|
||||
* [openSUSE and SUSE Linux Enterprise](linux/SUSE.md)
|
||||
* [Ubuntu](linux/ubuntulinux.md)
|
||||
|
||||
If your linux distribution is not listed above, don't give up yet. To try out Docker on a distribution that is not listed above, go here: [Installation from binaries](binaries.md).
|
||||
|
||||
## On Cloud
|
||||
* [Choose how to Install](cloud/cloud.md)
|
||||
* [Example: Manual install on a cloud provider](cloud/cloud-ex-aws.md)
|
||||
* [Example: Use Docker Machine to provision cloud hosts](cloud/cloud-ex-machine-ocean.md)
|
||||
|
||||
## On OSX and Windows
|
||||
* [Mac OS X](mac.md)
|
||||
* [Windows](windows.md)
|
||||
|
||||
## The Docker Archives
|
||||
Instructions for installing prior releases of Docker can be found in the following docker archives:
|
||||
[Docker v1.7](http://docs.docker.com/v1.7/), [Docker v1.6](http://docs.docker.com/v1.6/), [Docker v1.5](http://docs.docker.com/v1.5/), and [Docker v1.4](http://docs.docker.com/v1.4/).
|
||||
|
||||
## Where to go after installing
|
||||
* [About Docker Engine](../index.md)
|
||||
* [Support](https://www.docker.com/support/)
|
||||
* [Training](https://training.docker.com//)
|
||||
117
vendor/github.com/hyperhq/hypercli/docs/installation/linux/SUSE.md
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/SUSE/"]
|
||||
title = "Installation on openSUSE and SUSE Linux Enterprise"
|
||||
description = "Installation instructions for Docker on openSUSE and on SUSE Linux Enterprise."
|
||||
keywords = ["openSUSE, SUSE Linux Enterprise, SUSE, SLE, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# openSUSE and SUSE Linux Enterprise
|
||||
|
||||
This page provides instructions for installing and configuring the latest
|
||||
Docker Engine software on openSUSE and SUSE systems.
|
||||
|
||||
>**Note:** You can also find bleeding edge Docker versions inside of the repositories maintained by the [Virtualization:containers project](https://build.opensuse.org/project/show/Virtualization:containers) on the [Open Build Service](https://build.opensuse.org/). This project delivers also other packages that are related with the Docker ecosystem (for example, Docker Compose).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You must be running a 64 bit architecture.
|
||||
|
||||
## openSUSE
|
||||
|
||||
Docker is part of the official openSUSE repositories starting from 13.2. No
|
||||
additional repository is required on your system.
|
||||
|
||||
## SUSE Linux Enterprise
|
||||
|
||||
Docker is officially supported on SUSE Linux Enterprise 12 and later. You can find the latest supported Docker packages inside the `Container` module. To enable this module, do the following:
|
||||
|
||||
1. Start YaST, and select *Software > Software Repositories*.
|
||||
2. Click *Add* to open the add-on dialog.
|
||||
3. Select *Extensions and Module from Registration Server* and click *Next*.
|
||||
4. From the list of available extensions and modules, select *Container Module* and click *Next*.
|
||||
The containers module and its repositories are added to your system.
|
||||
5. If you use Subscription Management Tool, update the list of repositories at the SMT server.
|
||||
|
||||
Otherwise execute the following command:
|
||||
|
||||
$ sudo SUSEConnect -p sle-module-containers/12/x86_64 -r ''
|
||||
|
||||
>**Note:** currently the `-r ''` flag is required to avoid a known limitation of `SUSEConnect`.
|
||||
|
||||
The [Virtualization:containers project](https://build.opensuse.org/project/show/Virtualization:containers)
|
||||
on the [Open Build Service](https://build.opensuse.org/) contains also bleeding
|
||||
edge Docker packages for SUSE Linux Enterprise. However these packages are
|
||||
**not supported** by SUSE.
|
||||
|
||||
### Install Docker
|
||||
|
||||
1. Install the Docker package:
|
||||
|
||||
$ sudo zypper in docker
|
||||
|
||||
2. Start the Docker daemon.
|
||||
|
||||
$ sudo systemctl start docker
|
||||
|
||||
3. Test the Docker installation.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Configure Docker boot options
|
||||
|
||||
You can use these steps on openSUSE or SUSE Linux Enterprise. To start the `docker daemon` at boot, set the following:
|
||||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
The `docker` package creates a new group named `docker`. Users, other than
|
||||
`root` user, must be part of this group to interact with the
|
||||
Docker daemon. You can add users with this command syntax:
|
||||
|
||||
sudo /usr/sbin/usermod -a -G docker <username>
|
||||
|
||||
Once you add a user, make sure they relog to pick up these new permissions.
|
||||
|
||||
## Enable external network access
|
||||
|
||||
If you want your containers to be able to access the external network, you must
|
||||
enable the `net.ipv4.ip_forward` rule. To do this, use YaST.
|
||||
|
||||
For openSUSE Tumbleweed and later, browse to the **System -> Network Settings -> Routing** menu. For SUSE Linux Enterprise 12 and previous openSUSE versions, browse to **Network Devices -> Network Settings -> Routing** menu (f) and check the *Enable IPv4 Forwarding* box.
|
||||
|
||||
When networking is handled by the Network Manager, instead of YaST you must edit
|
||||
the `/etc/sysconfig/SuSEfirewall2` file needs by hand to ensure the `FW_ROUTE`
|
||||
flag is set to `yes` like so:
|
||||
|
||||
FW_ROUTE="yes"
|
||||
|
||||
## Custom daemon options
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read the systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo zypper rm docker
|
||||
|
||||
The above command does not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## Where to go from here
|
||||
|
||||
You can find more details about Docker on openSUSE or SUSE Linux Enterprise in the
|
||||
[Docker quick start guide](https://www.suse.com/documentation/sles-12/dockerquick/data/dockerquick.html)
|
||||
on the SUSE website. The document targets SUSE Linux Enterprise, but its contents apply also to openSUSE.
|
||||
|
||||
Continue to the [User Guide](../../userguide/index.md).
|
||||
105
vendor/github.com/hyperhq/hypercli/docs/installation/linux/archlinux.md
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/archlinux/"]
|
||||
title = "Installation on Arch Linux"
|
||||
description = "Installation instructions for Docker on ArchLinux."
|
||||
keywords = ["arch linux, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Arch Linux
|
||||
|
||||
Installing on Arch Linux can be handled via the package in community:
|
||||
|
||||
- [docker](https://www.archlinux.org/packages/community/x86_64/docker/)
|
||||
|
||||
or the following AUR package:
|
||||
|
||||
- [docker-git](https://aur.archlinux.org/packages/docker-git/)
|
||||
|
||||
The docker package will install the latest tagged version of docker. The
|
||||
docker-git package will build from the current master branch.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Docker depends on several packages which are specified as dependencies
|
||||
in the packages. The core dependencies are:
|
||||
|
||||
- bridge-utils
|
||||
- device-mapper
|
||||
- iproute2
|
||||
- sqlite
|
||||
|
||||
## Installation
|
||||
|
||||
For the normal package a simple
|
||||
|
||||
$ sudo pacman -S docker
|
||||
|
||||
is all that is needed.
|
||||
|
||||
For the AUR package execute:
|
||||
|
||||
$ yaourt -S docker-git
|
||||
|
||||
The instructions here assume **yaourt** is installed. See [Arch User
|
||||
Repository](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages)
|
||||
for information on building and installing packages from the AUR if you
|
||||
have not done so before.
|
||||
|
||||
## Starting Docker
|
||||
|
||||
There is a systemd service unit created for docker. To start the docker
|
||||
service:
|
||||
|
||||
$ sudo systemctl start docker
|
||||
|
||||
To start on system boot:
|
||||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
## Custom daemon options
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
## Running Docker with a manually-defined network
|
||||
|
||||
If you manually configure your network using `systemd-network` version 220 or
|
||||
higher, containers you start with Docker may be unable to access your network.
|
||||
Beginning with version 220, the forwarding setting for a given network
|
||||
(`net.ipv4.conf.<interface>.forwarding`) defaults to *off*. This setting
|
||||
prevents IP forwarding. It also conflicts with Docker which enables the
|
||||
`net.ipv4.conf.all.forwarding` setting within a container.
|
||||
|
||||
To work around this, edit the `<interface>.network` file in
|
||||
`/etc/systemd/network/` on your Docker host add the following block:
|
||||
|
||||
```
|
||||
[Network]
|
||||
...
|
||||
IPForward=kernel
|
||||
...
|
||||
```
|
||||
|
||||
This configuration allows IP forwarding from the container as expected.
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo pacman -R docker
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo pacman -Rns docker
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
188
vendor/github.com/hyperhq/hypercli/docs/installation/linux/centos.md
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/centos/"]
|
||||
title = "Installation on CentOS"
|
||||
description = "Instructions for installing Docker on CentOS"
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, centos, epel, docker.io, docker-io"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# CentOS
|
||||
|
||||
Docker runs on CentOS 7.X. An installation on other binary compatible EL7
|
||||
distributions such as Scientific Linux might succeed, but Docker does not test
|
||||
or support Docker on these distributions.
|
||||
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
of Docker. If you wish to install using CentOS-managed packages, consult your
|
||||
CentOS documentation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your CentOS version. Also,
|
||||
your kernel must be 3.10 at minimum, which CentOS 7 runs.
|
||||
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.10.0-229.el7.x86_64
|
||||
|
||||
Finally, is it recommended that you fully update your system. Please keep in
|
||||
mind that your system should be fully patched to fix any potential kernel bugs.
|
||||
Any reported kernel bugs may have already been fixed on the latest kernel
|
||||
packages.
|
||||
|
||||
## Install
|
||||
|
||||
There are two ways to install Docker Engine. You can install using the `yum`
|
||||
package manager. Or you can use `curl` with the `get.docker.com` site. This
|
||||
second method runs an installation script which also installs via the `yum`
|
||||
package manager.
|
||||
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo.
|
||||
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
|
||||
## Create a docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](../../security/security.md#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into Centos as a user with `sudo` privileges.
|
||||
|
||||
2. Create the `docker` group and add your user.
|
||||
|
||||
`sudo usermod -aG docker your_username`
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
## Start the docker daemon at boot
|
||||
|
||||
To ensure Docker starts when you boot your system, do the following:
|
||||
|
||||
$ sudo chkconfig docker on
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our Systemd article to
|
||||
learn how to [customize your Systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
|
||||
## Uninstall
|
||||
|
||||
You can uninstall the Docker software with `yum`.
|
||||
|
||||
1. List the package you have installed.
|
||||
|
||||
$ yum list installed | grep docker
|
||||
yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-1.el7 @/docker-engine-1.7.1-1.el7.x86_64.rpm
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
$ sudo yum -y remove docker-engine.x86_64
|
||||
|
||||
This command does not remove images, containers, volumes, or user-created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
4. Locate and delete any user-created configuration files.
|
||||
93
vendor/github.com/hyperhq/hypercli/docs/installation/linux/cruxlinux.md
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/cruxlinux/"]
|
||||
title = "Installation on CRUX Linux"
|
||||
description = "Docker installation on CRUX Linux."
|
||||
keywords = ["crux linux, Docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# CRUX Linux
|
||||
|
||||
Installing on CRUX Linux can be handled via the contrib ports from
|
||||
[James Mills](http://prologic.shortcircuit.net.au/) and are included in the
|
||||
official [contrib](http://crux.nu/portdb/?a=repo&q=contrib) ports:
|
||||
|
||||
- docker
|
||||
|
||||
The `docker` port will build and install the latest tagged version of Docker.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Assuming you have contrib enabled, update your ports tree and install docker:
|
||||
|
||||
$ sudo prt-get depinst docker
|
||||
|
||||
|
||||
## Kernel requirements
|
||||
|
||||
To have a working **CRUX+Docker** Host you must ensure your Kernel has
|
||||
the necessary modules enabled for the Docker Daemon to function correctly.
|
||||
|
||||
Please read the `README`:
|
||||
|
||||
$ sudo prt-get readme docker
|
||||
|
||||
The `docker` port installs the `contrib/check-config.sh` script
|
||||
provided by the Docker contributors for checking your kernel
|
||||
configuration as a suitable Docker host.
|
||||
|
||||
To check your Kernel configuration run:
|
||||
|
||||
$ /usr/share/docker/check-config.sh
|
||||
|
||||
## Starting Docker
|
||||
|
||||
There is a rc script created for Docker. To start the Docker service:
|
||||
|
||||
$ sudo /etc/rc.d/docker start
|
||||
|
||||
To start on system boot:
|
||||
|
||||
- Edit `/etc/rc.conf`
|
||||
- Put `docker` into the `SERVICES=(...)` array after `net`.
|
||||
|
||||
## Images
|
||||
|
||||
There is a CRUX image maintained by [James Mills](http://prologic.shortcircuit.net.au/)
|
||||
as part of the Docker "Official Library" of images. To use this image simply pull it
|
||||
or use it as part of your `FROM` line in your `Dockerfile(s)`.
|
||||
|
||||
$ docker pull crux
|
||||
$ docker run -i -t crux
|
||||
|
||||
There are also user contributed [CRUX based image(s)](https://registry.hub.docker.com/repos/crux/) on the Docker Hub.
|
||||
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo prt-get remove docker
|
||||
|
||||
The above command will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## Issues
|
||||
|
||||
If you have any issues please file a bug with the
|
||||
[CRUX Bug Tracker](http://crux.nu/bugs/).
|
||||
|
||||
## Support
|
||||
|
||||
For support contact the [CRUX Mailing List](http://crux.nu/Main/MailingLists)
|
||||
or join CRUX's [IRC Channels](http://crux.nu/Main/IrcChannels). on the
|
||||
[FreeNode](http://freenode.net/) IRC Network.
|
||||
184
vendor/github.com/hyperhq/hypercli/docs/installation/linux/debian.md
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/debian/"]
|
||||
title = "Installation on Debian"
|
||||
description = "Instructions for installing Docker on Debian."
|
||||
keywords = ["Docker, Docker documentation, installation, debian"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Debian
|
||||
|
||||
Docker is supported on the following versions of Debian:
|
||||
|
||||
- [*Debian testing stretch (64-bit)*](#debian-wheezy-stable-7-x-64-bit)
|
||||
- [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-80-64-bit)
|
||||
- [*Debian 7.7 Wheezy (64-bit)*](#debian-wheezy-stable-7-x-64-bit)
|
||||
|
||||
>**Note**: If you previously installed Docker using `APT`, make sure you update
|
||||
your `APT` sources to the new `APT` repository.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your Debian version.
|
||||
Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor
|
||||
version or a newer maintained version are also acceptable.
|
||||
|
||||
Kernels older than 3.10 lack some of the features required to run Docker
|
||||
containers. These older versions are known to have bugs which cause data loss
|
||||
and frequently panic under certain conditions.
|
||||
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
|
||||
### Update your apt repository
|
||||
|
||||
Docker's `APT` repository contains Docker 1.7.1 and higher. To set `APT` to use
|
||||
from the new repository:
|
||||
|
||||
1. If you haven't already done so, log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Open a terminal window.
|
||||
|
||||
3. Purge any older repositories.
|
||||
|
||||
$ apt-get purge lxc-docker*
|
||||
$ apt-get purge docker.io*
|
||||
|
||||
4. Update package information, ensure that APT works with the `https` method, and that CA certificates are installed.
|
||||
|
||||
$ apt-get update
|
||||
$ apt-get install apt-transport-https ca-certificates
|
||||
|
||||
5. Add the new `GPG` key.
|
||||
|
||||
$ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
|
||||
6. Open the `/etc/apt/sources.list.d/docker.list` file in your favorite editor.
|
||||
|
||||
If the file doesn't exist, create it.
|
||||
|
||||
7. Remove any existing entries.
|
||||
|
||||
8. Add an entry for your Debian operating system.
|
||||
|
||||
The possible entries are:
|
||||
|
||||
- On Debian Wheezy
|
||||
|
||||
deb https://apt.dockerproject.org/repo debian-wheezy main
|
||||
|
||||
- On Debian Jessie
|
||||
|
||||
deb https://apt.dockerproject.org/repo debian-jessie main
|
||||
|
||||
- On Debian Stretch/Sid
|
||||
|
||||
deb https://apt.dockerproject.org/repo debian-stretch main
|
||||
|
||||
> **Note**: Docker does not provide packages for all architectures. To install docker on
|
||||
> a multi-architecture system, add an `[arch=...]` clause to the entry. Refer to the
|
||||
> [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources)
|
||||
> for details.
|
||||
|
||||
9. Save and close the file.
|
||||
|
||||
10. Update the `APT` package index.
|
||||
|
||||
$ apt-get update
|
||||
|
||||
11. Verify that `APT` is pulling from the right repository.
|
||||
|
||||
$ apt-cache policy docker-engine
|
||||
|
||||
From now on when you run `apt-get upgrade`, `APT` pulls from the new apt repository.
|
||||
|
||||
## Install Docker
|
||||
|
||||
Before installing Docker, make sure you have set your `APT` repository correctly as described in the prerequisites.
|
||||
|
||||
1. Update the `APT` package index.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
2. Install Docker.
|
||||
|
||||
$ sudo apt-get install docker-engine
|
||||
|
||||
5. Start the `docker` daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
6. Verify `docker` is installed correctly.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
This command downloads a test image and runs it in a container. When the
|
||||
container runs, it prints an informational message. Then, it exits.
|
||||
|
||||
|
||||
## Giving non-root access
|
||||
|
||||
The `docker` daemon always runs as the `root` user and the `docker`
|
||||
daemon binds to a Unix socket instead of a TCP port. By default that
|
||||
Unix socket is owned by the user `root`, and so, by default, you can
|
||||
access it with `sudo`.
|
||||
|
||||
If you (or your Docker installer) create a Unix group called `docker`
|
||||
and add users to it, then the `docker` daemon will make the ownership of
|
||||
the Unix socket read/writable by the `docker` group when the daemon
|
||||
starts. The `docker` daemon must always run as the root user, but if you
|
||||
run the `docker` client as a user in the `docker` group then you don't
|
||||
need to add `sudo` to all the client commands. From Docker 0.9.0 you can
|
||||
use the `-G` flag to specify an alternative group.
|
||||
|
||||
> **Warning**:
|
||||
> The `docker` group (or the group specified with the `-G` flag) is
|
||||
> `root`-equivalent; see [*Docker Daemon Attack Surface*](../../security/security.md#docker-daemon-attack-surface) details.
|
||||
|
||||
**Example:**
|
||||
|
||||
# Add the docker group if it doesn't already exist.
|
||||
$ sudo groupadd docker
|
||||
|
||||
# Add the connected user "${USER}" to the docker group.
|
||||
# Change the user name to match your preferred user.
|
||||
# You may have to logout and log back in again for
|
||||
# this to take effect.
|
||||
$ sudo gpasswd -a ${USER} docker
|
||||
|
||||
# Restart the Docker daemon.
|
||||
$ sudo service docker restart
|
||||
|
||||
## Upgrade Docker
|
||||
|
||||
To install the latest version of Docker with `apt-get`:
|
||||
|
||||
$ apt-get upgrade docker-engine
|
||||
|
||||
## Uninstall
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo apt-get purge docker-engine
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo apt-get autoremove --purge docker-engine
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## What next?
|
||||
|
||||
Continue with the [User Guide](../../userguide/index.md).
|
||||
199
vendor/github.com/hyperhq/hypercli/docs/installation/linux/fedora.md
generated
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/fedora/"]
|
||||
title = "Installation on Fedora"
|
||||
description = "Instructions for installing Docker on Fedora."
|
||||
keywords = ["Docker, Docker documentation, Fedora, requirements, linux"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Fedora
|
||||
|
||||
Docker is supported on Fedora version 22 and 23. This page instructs you to install
|
||||
using Docker-managed release packages and installation mechanisms. Using these
|
||||
packages ensures you get the latest release of Docker. If you wish to install
|
||||
using Fedora-managed packages, consult your Fedora release documentation for
|
||||
information on Fedora's Docker support.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your Fedora version. Also, your kernel must be 3.10 at minimum. To check your current kernel
|
||||
version, open a terminal and use `uname -r` to display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.19.5-100.fc21.x86_64
|
||||
|
||||
If your kernel is at a older version, you must update it.
|
||||
|
||||
Finally, is it recommended that you fully update your system. Please keep in
|
||||
mind that your system should be fully patched to fix any potential kernel bugs. Any
|
||||
reported kernel bugs may have already been fixed on the latest kernel packages
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
There are two ways to install Docker Engine. You can install with the `dnf` package manager. Or you can use `curl` with the `get.docker.com` site. This second method runs an installation script which also installs via the `dnf` package manager.
|
||||
|
||||
### Install with DNF
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing dnf packages are up-to-date.
|
||||
|
||||
$ sudo dnf update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/fedora/$releasever/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo dnf install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
$ sudo systemctl start docker
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
|
||||
### Install with the script
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing dnf packages are up-to-date.
|
||||
|
||||
$ sudo dnf update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo systemctl start docker
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Create a docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](../../security/security.md#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into your system as a user with `sudo` privileges.
|
||||
|
||||
2. Create the `docker` group and add your user.
|
||||
|
||||
`sudo usermod -aG docker your_username`
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
## Start the docker daemon at boot
|
||||
|
||||
To ensure Docker starts when you boot your system, do the following:
|
||||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our Systemd article to
|
||||
learn how to [customize your Systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
## Running Docker with a manually-defined network
|
||||
|
||||
If you manually configure your network using `systemd-network` with `systemd` version 219 or higher, containers you start with Docker may be unable to access your network.
|
||||
Beginning with version 220, the forwarding setting for a given network (`net.ipv4.conf.<interface>.forwarding`) defaults to *off*. This setting prevents IP forwarding. It also conflicts with Docker which enables the `net.ipv4.conf.all.forwarding` setting within a container.
|
||||
|
||||
To work around this, edit the `<interface>.network` file in
|
||||
`/usr/lib/systemd/network/` on your Docker host (ex: `/usr/lib/systemd/network/80-container-host0.network`) add the following block:
|
||||
|
||||
```
|
||||
[Network]
|
||||
...
|
||||
IPForward=kernel
|
||||
# OR
|
||||
IPForward=true
|
||||
...
|
||||
```
|
||||
|
||||
This configuration allows IP forwarding from the container as expected.
|
||||
|
||||
## Uninstall
|
||||
|
||||
You can uninstall the Docker software with `dnf`.
|
||||
|
||||
1. List the package you have installed.
|
||||
|
||||
$ dnf list installed | grep docker dnf list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-0.1.fc21 @/docker-engine-1.7.1-0.1.fc21.el7.x86_64
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
$ sudo dnf -y remove docker-engine.x86_64
|
||||
|
||||
This command does not remove images, containers, volumes, or user-created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
4. Locate and delete any user-created configuration files.
|
||||
75
vendor/github.com/hyperhq/hypercli/docs/installation/linux/frugalware.md
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/frugalware/"]
|
||||
title = "Installation on FrugalWare"
|
||||
description = "Installation instructions for Docker on FrugalWare."
|
||||
keywords = ["frugalware linux, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# FrugalWare
|
||||
|
||||
Installing on FrugalWare is handled via the official packages:
|
||||
|
||||
- [lxc-docker i686](http://www.frugalware.org/packages/200141)
|
||||
- [lxc-docker x86_64](http://www.frugalware.org/packages/200130)
|
||||
|
||||
The lxc-docker package will install the latest tagged version of Docker.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Docker depends on several packages which are specified as dependencies
|
||||
in the packages. The core dependencies are:
|
||||
|
||||
- systemd
|
||||
- lvm2
|
||||
- sqlite3
|
||||
- libguestfs
|
||||
- lxc
|
||||
- iproute2
|
||||
- bridge-utils
|
||||
|
||||
## Installation
|
||||
|
||||
A simple
|
||||
|
||||
$ sudo pacman -S lxc-docker
|
||||
|
||||
is all that is needed.
|
||||
|
||||
## Starting Docker
|
||||
|
||||
There is a systemd service unit created for Docker. To start Docker as
|
||||
service:
|
||||
|
||||
$ sudo systemctl start lxc-docker
|
||||
|
||||
To start on system boot:
|
||||
|
||||
$ sudo systemctl enable lxc-docker
|
||||
|
||||
## Custom daemon options
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo pacman -R lxc-docker
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo pacman -Rns lxc-docker
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
121
vendor/github.com/hyperhq/hypercli/docs/installation/linux/gentoolinux.md
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/gentoolinux/"]
|
||||
title = "Installation on Gentoo"
|
||||
description = "Installation instructions for Docker on Gentoo."
|
||||
keywords = ["gentoo linux, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Gentoo
|
||||
|
||||
Installing Docker on Gentoo Linux can be accomplished using one of two ways: the **official** way and the `docker-overlay` way.
|
||||
|
||||
Official project page of [Gentoo Docker](https://wiki.gentoo.org/wiki/Project:Docker) team.
|
||||
|
||||
## Official way
|
||||
The first and recommended way if you are looking for a stable
|
||||
experience is to use the official `app-emulation/docker` package directly
|
||||
from the tree.
|
||||
|
||||
If any issues arise from this ebuild including, missing kernel
|
||||
configuration flags or dependencies, open a bug
|
||||
on the Gentoo [Bugzilla](https://bugs.gentoo.org) assigned to `docker AT gentoo DOT org`
|
||||
or join and ask in the official
|
||||
[IRC](http://webchat.freenode.net?channels=%23gentoo-containers&uio=d4) channel on the Freenode network.
|
||||
|
||||
## docker-overlay way
|
||||
|
||||
If you're looking for a `-bin` ebuild, a live ebuild, or a bleeding edge
|
||||
ebuild, use the provided overlay, [docker-overlay](https://github.com/tianon/docker-overlay)
|
||||
which can be added using `app-portage/layman`. The most accurate and
|
||||
up-to-date documentation for properly installing and using the overlay
|
||||
can be found in the [overlay](https://github.com/tianon/docker-overlay/blob/master/README.md#using-this-overlay).
|
||||
|
||||
If any issues arise from this ebuild or the resulting binary, including
|
||||
and especially missing kernel configuration flags or dependencies,
|
||||
open an [issue](https://github.com/tianon/docker-overlay/issues) on
|
||||
the `docker-overlay` repository or ping `tianon` directly in the `#docker`
|
||||
IRC channel on the Freenode network.
|
||||
|
||||
## Installation
|
||||
|
||||
### Available USE flags
|
||||
|
||||
| USE Flag | Default | Description |
|
||||
| ------------- |:-------:|:------------|
|
||||
| aufs | |Enables dependencies for the "aufs" graph driver, including necessary kernel flags.|
|
||||
| btrfs | |Enables dependencies for the "btrfs" graph driver, including necessary kernel flags.|
|
||||
| contrib | Yes |Install additional contributed scripts and components.|
|
||||
| device-mapper | Yes |Enables dependencies for the "devicemapper" graph driver, including necessary kernel flags.|
|
||||
| doc | |Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally.|
|
||||
| vim-syntax | |Pulls in related vim syntax scripts.|
|
||||
| zsh-completion| |Enable zsh completion support.|
|
||||
|
||||
USE flags are described in detail on [tianon's
|
||||
blog](https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html).
|
||||
|
||||
The package should properly pull in all the necessary dependencies and
|
||||
prompt for all necessary kernel options.
|
||||
|
||||
$ sudo emerge -av app-emulation/docker
|
||||
|
||||
>Note: Sometimes there is a disparity between the latest versions
|
||||
>in the official **Gentoo tree** and the **docker-overlay**.
|
||||
>Please be patient, and the latest version should propagate shortly.
|
||||
|
||||
## Starting Docker
|
||||
|
||||
Ensure that you are running a kernel that includes all the necessary
|
||||
modules and configuration (and optionally for device-mapper
|
||||
and AUFS or Btrfs, depending on the storage driver you've decided to use).
|
||||
|
||||
To use Docker, the `docker` daemon must be running as **root**.
|
||||
To use Docker as a **non-root** user, add yourself to the **docker**
|
||||
group by running the following command:
|
||||
|
||||
$ sudo usermod -a -G docker user
|
||||
|
||||
### OpenRC
|
||||
|
||||
To start the `docker` daemon:
|
||||
|
||||
$ sudo /etc/init.d/docker start
|
||||
|
||||
To start on system boot:
|
||||
|
||||
$ sudo rc-update add docker default
|
||||
|
||||
### systemd
|
||||
|
||||
To start the `docker` daemon:
|
||||
|
||||
$ sudo systemctl start docker
|
||||
|
||||
To start on system boot:
|
||||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo emerge -cav app-emulation/docker
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo emerge -C app-emulation/docker
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
29
vendor/github.com/hyperhq/hypercli/docs/installation/linux/index.md
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "On Linux distributions"
|
||||
description = "Lists the installation methods"
|
||||
keywords = ["docker", "engine","install", "linux"]
|
||||
[menu.main]
|
||||
identifier = "engine_linux"
|
||||
parent="engine_install"
|
||||
weight="-70"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Docker Engine on Linux
|
||||
|
||||
Docker Engine is supported on several Linux distributions. Installation instructions are available for the following:
|
||||
|
||||
* [Arch Linux](archlinux.md)
|
||||
* [CentOS](centos.md)
|
||||
* [CRUX Linux](cruxlinux.md)
|
||||
* [Debian](debian.md)
|
||||
* [Fedora](fedora.md)
|
||||
* [FrugalWare](frugalware.md)
|
||||
* [Gentoo](gentoolinux.md)
|
||||
* [Oracle Linux](oracle.md)
|
||||
* [Red Hat Enterprise Linux](rhel.md)
|
||||
* [openSUSE and SUSE Linux Enterprise](SUSE.md)
|
||||
* [Ubuntu](ubuntulinux.md)
|
||||
|
||||
If your linux distribution is not listed above, don't give up yet. To try out Docker on a distribution that is not listed above, go here: [Installation from binaries](../binaries.md).
|
||||
210
vendor/github.com/hyperhq/hypercli/docs/installation/linux/oracle.md
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/oracle/"]
|
||||
title = "Installation on Oracle Linux"
|
||||
description = "Installation instructions for Docker on Oracle Linux."
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, rhel, centos, oracle, ol"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Oracle Linux
|
||||
|
||||
Docker is supported Oracle Linux 6 and 7. You do not require an Oracle Linux
|
||||
Support subscription to install Docker on Oracle Linux.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Due to current Docker limitations, Docker is only able to run only on the x86_64
|
||||
architecture. Docker requires the use of the Unbreakable Enterprise Kernel
|
||||
Release 4 (4.1.12) or higher on Oracle Linux. This kernel supports the Docker
|
||||
btrfs storage engine on both Oracle Linux 6 and 7.
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
> **Note**: The procedure below installs binaries built by Docker. These binaries
|
||||
> are not covered by Oracle Linux support. To ensure Oracle Linux support, please
|
||||
> follow the installation instructions provided in the
|
||||
> [Oracle Linux documentation](https://docs.oracle.com/en/operating-systems/?tab=2).
|
||||
>
|
||||
> The installation instructions for Oracle Linux 6 can be found in [Chapter 10 of
|
||||
> the Administrator's
|
||||
> Solutions Guide](https://docs.oracle.com/cd/E37670_01/E37355/html/ol_docker.html)
|
||||
>
|
||||
> The installation instructions for Oracle Linux 7 can be found in [Chapter 29 of
|
||||
> the Administrator's
|
||||
> Guide](https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-docker.html)
|
||||
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
For version 6:
|
||||
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/6
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
For version 7:
|
||||
|
||||
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
On Oracle Linux 6:
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
On Oracle Linux 7:
|
||||
|
||||
$ sudo systemctl start docker.service
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Optional configurations
|
||||
|
||||
This section contains optional procedures for configuring your Oracle Linux to work
|
||||
better with Docker.
|
||||
|
||||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
* [Use the btrfs storage engine](#use-the-btrfs-storage-engine)
|
||||
|
||||
### Create a Docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](../../security/security.md#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into Oracle Linux as a user with `sudo` privileges.
|
||||
|
||||
2. Create the `docker` group and add your user.
|
||||
|
||||
sudo usermod -aG docker username
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
If this fails with a message similar to this:
|
||||
|
||||
Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?
|
||||
|
||||
Check that the `DOCKER_HOST` environment variable is not set for your shell.
|
||||
If it is, unset it.
|
||||
|
||||
### Configure Docker to start on boot
|
||||
|
||||
You can configure the Docker daemon to start automatically at boot.
|
||||
|
||||
On Oracle Linux 6:
|
||||
|
||||
```
|
||||
$ sudo chkconfig docker on
|
||||
```
|
||||
|
||||
On Oracle Linux 7:
|
||||
|
||||
```
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our systemd article to
|
||||
learn how to [customize your systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
### Use the btrfs storage engine
|
||||
|
||||
Docker on Oracle Linux 6 and 7 supports the use of the btrfs storage engine.
|
||||
Before enabling btrfs support, ensure that `/var/lib/docker` is stored on a
|
||||
btrfs-based filesystem. Review [Chapter
|
||||
5](http://docs.oracle.com/cd/E37670_01/E37355/html/ol_btrfs.html) of the [Oracle
|
||||
Linux Administrator's Solution
|
||||
Guide](http://docs.oracle.com/cd/E37670_01/E37355/html/index.html) for details
|
||||
on how to create and mount btrfs filesystems.
|
||||
|
||||
To enable btrfs support on Oracle Linux:
|
||||
|
||||
1. Ensure that `/var/lib/docker` is on a btrfs filesystem.
|
||||
|
||||
2. Edit `/etc/sysconfig/docker` and add `-s btrfs` to the `OTHER_ARGS` field.
|
||||
|
||||
3. Restart the Docker daemon:
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo yum -y remove docker-engine
|
||||
|
||||
The above command will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
|
||||
## Known issues
|
||||
|
||||
### Docker unmounts btrfs filesystem on shutdown
|
||||
If you're running Docker using the btrfs storage engine and you stop the Docker
|
||||
service, it will unmount the btrfs filesystem during the shutdown process. You
|
||||
should ensure the filesystem is mounted properly prior to restarting the Docker
|
||||
service.
|
||||
|
||||
On Oracle Linux 7, you can use a `systemd.mount` definition and modify the
|
||||
Docker `systemd.service` to depend on the btrfs mount defined in systemd.
|
||||
|
||||
### SElinux support on Oracle Linux 7
|
||||
SElinux must be set to `Permissive` or `Disabled` in `/etc/sysconfig/selinux` to
|
||||
use the btrfs storage engine on Oracle Linux 7.
|
||||
|
||||
## Further issues?
|
||||
|
||||
If you have a current Basic or Premier Support Subscription for Oracle Linux,
|
||||
you can report any issues you have with the installation of Docker via a Service
|
||||
Request at [My Oracle Support](http://support.oracle.com).
|
||||
|
||||
If you do not have an Oracle Linux Support Subscription, you can use the [Oracle
|
||||
Linux
|
||||
Forum](https://community.oracle.com/community/server_%26_storage_systems/linux/oracle_linux) for community-based support.
|
||||
180
vendor/github.com/hyperhq/hypercli/docs/installation/linux/rhel.md
generated
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/rhel/"]
|
||||
title = "Installation on Red Hat Enterprise Linux"
|
||||
description = "Instructions for installing Docker on Red Hat Enterprise Linux."
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, rhel"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight = -5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Red Hat Enterprise Linux
|
||||
|
||||
Docker is supported on Red Hat Enterprise Linux 7. This page instructs you to
|
||||
install using Docker-managed release packages and installation mechanisms. Using
|
||||
these packages ensures you get the latest release of Docker. If you wish to
|
||||
install using Red Hat-managed packages, consult your Red Hat release
|
||||
documentation for information on Red Hat's Docker support.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your Red Hat version. Docker
|
||||
requires that your kernel must be 3.10 at minimum, which Red Hat 7 runs.
|
||||
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.10.0-229.el7.x86_64
|
||||
|
||||
Finally, is it recommended that you fully update your system. Please keep in
|
||||
mind that your system should be fully patched to fix any potential kernel bugs.
|
||||
Any reported kernel bugs may have already been fixed on the latest kernel
|
||||
packages.
|
||||
|
||||
## Install Docker Engine
|
||||
|
||||
There are two ways to install Docker Engine. You can install with the `yum` package manager directly yourself. Or you can use `curl` with the `get.docker.com` site. This second method runs an installation script which installs via the `yum` package manager.
|
||||
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Add the yum repo yourself.
|
||||
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-EOF
|
||||
[dockerrepo]
|
||||
name=Docker Repository
|
||||
baseurl=https://yum.dockerproject.org/repo/main/centos/7
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://yum.dockerproject.org/gpg
|
||||
EOF
|
||||
|
||||
4. Install the Docker package.
|
||||
|
||||
$ sudo yum install docker-engine
|
||||
|
||||
5. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
latest: Pulling from hello-world
|
||||
a8219747be10: Pull complete
|
||||
91c95931e552: Already exists
|
||||
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
|
||||
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838d
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
### Install with the script
|
||||
|
||||
You use the same installation procedure for all versions of CentOS.
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing yum packages are up-to-date.
|
||||
|
||||
$ sudo yum update
|
||||
|
||||
3. Run the Docker installation script.
|
||||
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
||||
4. Start the Docker daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
## Create a docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](../../security/security.md#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Create the `docker` group and add your user.
|
||||
|
||||
`sudo usermod -aG docker your_username`
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
## Start the docker daemon at boot
|
||||
|
||||
To ensure Docker starts when you boot your system, do the following:
|
||||
|
||||
$ sudo chkconfig docker on
|
||||
|
||||
If you need to add an HTTP Proxy, set a different directory or partition for the
|
||||
Docker runtime files, or make other customizations, read our Systemd article to
|
||||
learn how to [customize your Systemd Docker daemon options](../../admin/systemd.md).
|
||||
|
||||
|
||||
## Uninstall
|
||||
|
||||
You can uninstall the Docker software with `yum`.
|
||||
|
||||
1. List the package you have installed.
|
||||
|
||||
$ yum list installed | grep docker
|
||||
yum list installed | grep docker
|
||||
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
|
||||
|
||||
2. Remove the package.
|
||||
|
||||
$ sudo yum -y remove docker-engine.x86_64
|
||||
|
||||
This command does not remove images, containers, volumes, or user created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
4. Locate and delete any user-created configuration files.
|
||||
442
vendor/github.com/hyperhq/hypercli/docs/installation/linux/ubuntulinux.md
generated
vendored
Normal file
@@ -0,0 +1,442 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/ubuntulinux/"]
|
||||
title = "Installation on Ubuntu "
|
||||
description = "Instructions for installing Docker on Ubuntu. "
|
||||
keywords = ["Docker, Docker documentation, requirements, apt, installation, ubuntu"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight = -6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Ubuntu
|
||||
|
||||
Docker is supported on these Ubuntu operating systems:
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
- Ubuntu Precise 12.04 (LTS)
|
||||
|
||||
This page instructs you to install using Docker-managed release packages and
|
||||
installation mechanisms. Using these packages ensures you get the latest release
|
||||
of Docker. If you wish to install using Ubuntu-managed packages, consult your
|
||||
Ubuntu documentation.
|
||||
|
||||
>**Note**: Ubuntu Utopic 14.10 and 15.04 exist in Docker's `APT` repository but
|
||||
> are no longer officially supported.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker requires a 64-bit installation regardless of your Ubuntu version.
|
||||
Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version
|
||||
or a newer maintained version are also acceptable.
|
||||
|
||||
Kernels older than 3.10 lack some of the features required to run Docker
|
||||
containers. These older versions are known to have bugs which cause data loss
|
||||
and frequently panic under certain conditions.
|
||||
|
||||
To check your current kernel version, open a terminal and use `uname -r` to
|
||||
display your kernel version:
|
||||
|
||||
$ uname -r
|
||||
3.11.0-15-generic
|
||||
|
||||
>**Note**: If you previously installed Docker using `APT`, make sure you update
|
||||
your `APT` sources to the new Docker repository.
|
||||
|
||||
### Update your apt sources
|
||||
|
||||
Docker's `APT` repository contains Docker 1.7.1 and higher. To set `APT` to use
|
||||
packages from the new repository:
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Open a terminal window.
|
||||
|
||||
3. Update package information, ensure that APT works with the `https` method, and that CA certificates are installed.
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install apt-transport-https ca-certificates
|
||||
|
||||
4. Add the new `GPG` key.
|
||||
|
||||
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
|
||||
5. Open the `/etc/apt/sources.list.d/docker.list` file in your favorite editor.
|
||||
|
||||
If the file doesn't exist, create it.
|
||||
|
||||
6. Remove any existing entries.
|
||||
|
||||
7. Add an entry for your Ubuntu operating system.
|
||||
|
||||
The possible entries are:
|
||||
|
||||
- On Ubuntu Precise 12.04 (LTS)
|
||||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-precise main
|
||||
|
||||
- On Ubuntu Trusty 14.04 (LTS)
|
||||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-trusty main
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-wily main
|
||||
|
||||
> **Note**: Docker does not provide packages for all architectures. To install docker on
|
||||
> a multi-architecture system, add an `[arch=...]` clause to the entry. Refer to the
|
||||
> [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources)
|
||||
> for details.
|
||||
|
||||
8. Save and close the `/etc/apt/sources.list.d/docker.list` file.
|
||||
|
||||
9. Update the `APT` package index.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
10. Purge the old repo if it exists.
|
||||
|
||||
$ sudo apt-get purge lxc-docker
|
||||
|
||||
11. Verify that `APT` is pulling from the right repository.
|
||||
|
||||
$ apt-cache policy docker-engine
|
||||
|
||||
From now on when you run `apt-get upgrade`, `APT` pulls from the new repository.
|
||||
|
||||
### Prerequisites by Ubuntu Version
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Vivid 15.04
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
|
||||
For Ubuntu Trusty, Vivid, and Wily, it's recommended to install the
|
||||
`linux-image-extra` kernel package. The `linux-image-extra` package
|
||||
allows you use the `aufs` storage driver.
|
||||
|
||||
To install the `linux-image-extra` package for your kernel version:
|
||||
|
||||
1. Open a terminal on your Ubuntu host.
|
||||
|
||||
2. Update your package manager.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
3. Install the recommended package.
|
||||
|
||||
$ sudo apt-get install linux-image-extra-$(uname -r)
|
||||
|
||||
4. Go ahead and install Docker.
|
||||
|
||||
If you are installing on Ubuntu 14.04 or 12.04, `apparmor` is required. You can install it using: `apt-get install apparmor`
|
||||
|
||||
#### Ubuntu Precise 12.04 (LTS)
|
||||
|
||||
For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel
|
||||
version is older than 3.13, you must upgrade it. Refer to this table to see
|
||||
which packages are required for your environment:
|
||||
|
||||
<style type="text/css"> .tg {border-collapse:collapse;border-spacing:0;} .tg
|
||||
td{font-size:14px;padding:10px
|
||||
5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
||||
.tg-031{width:275px;font-family:monospace} </style> <table class="tg"> <tr> <td
|
||||
class="tg-031">linux-image-generic-lts-trusty</td> <td class="tg-031e">Generic
|
||||
Linux kernel image. This kernel has AUFS built in. This is required to run
|
||||
Docker.</td> </tr> <tr> <td class="tg-031">linux-headers-generic-lts-trusty</td>
|
||||
<td class="tg-031e">Allows packages such as ZFS and VirtualBox guest additions
|
||||
which depend on them. If you didn't install the headers for your existing
|
||||
kernel, then you can skip these headers for the"trusty" kernel. If you're
|
||||
unsure, you should include this package for safety.</td> </tr> <tr> <td
|
||||
class="tg-031">xserver-xorg-lts-trusty</td> <td class="tg-031e"
|
||||
rowspan="2">Optional in non-graphical environments without Unity/Xorg.
|
||||
<b>Required</b> when running Docker on machine with a graphical environment.
|
||||
<br>
|
||||
<br>To learn more about the reasons for these packages, read the installation
|
||||
instructions for backported kernels, specifically the <a
|
||||
href="https://wiki.ubuntu.com/Kernel/LTSEnablementStack" target="_blank">LTS
|
||||
Enablement Stack</a> — refer to note 5 under each version.
|
||||
</td> </tr>
|
||||
<tr> <td class="tg-031">libgl1-mesa-glx-lts-trusty</td> </tr> </table>
|
||||
|
||||
To upgrade your kernel and install the additional packages, do the following:
|
||||
|
||||
1. Open a terminal on your Ubuntu host.
|
||||
|
||||
2. Update your package manager.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
3. Install both the required and optional packages.
|
||||
|
||||
$ sudo apt-get install linux-image-generic-lts-trusty
|
||||
|
||||
Depending on your environment, you may install more as described in the preceding table.
|
||||
|
||||
4. Reboot your host.
|
||||
|
||||
$ sudo reboot
|
||||
|
||||
5. After your system reboots, go ahead and install Docker.
|
||||
|
||||
## Install
|
||||
|
||||
Make sure you have installed the prerequisites for your Ubuntu version.
|
||||
|
||||
Then,
|
||||
install Docker using the following:
|
||||
|
||||
1. Log into your Ubuntu installation as a user with `sudo` privileges.
|
||||
|
||||
2. Update your `APT` package index.
|
||||
|
||||
$ sudo apt-get update
|
||||
|
||||
3. Install Docker.
|
||||
|
||||
$ sudo apt-get install docker-engine
|
||||
|
||||
4. Start the `docker` daemon.
|
||||
|
||||
$ sudo service docker start
|
||||
|
||||
5. Verify `docker` is installed correctly.
|
||||
|
||||
$ sudo docker run hello-world
|
||||
|
||||
This command downloads a test image and runs it in a container. When the
|
||||
container runs, it prints an informational message. Then, it exits.
|
||||
|
||||
## Optional configurations
|
||||
|
||||
This section contains optional procedures for configuring your Ubuntu to work
|
||||
better with Docker.
|
||||
|
||||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Adjust memory and swap accounting](#adjust-memory-and-swap-accounting)
|
||||
* [Enable UFW forwarding](#enable-ufw-forwarding)
|
||||
* [Configure a DNS server for use by Docker](#configure-a-dns-server-for-use-by-docker)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
|
||||
### Create a Docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
`sudo`. For this reason, `docker` daemon always runs as the `root` user.
|
||||
|
||||
To avoid having to use `sudo` when you use the `docker` command, create a Unix
|
||||
group called `docker` and add users to it. When the `docker` daemon starts, it
|
||||
makes the ownership of the Unix socket read/writable by the `docker` group.
|
||||
|
||||
>**Warning**: The `docker` group is equivalent to the `root` user; For details
|
||||
>on how this impacts security in your system, see [*Docker Daemon Attack
|
||||
>Surface*](../../security/security.md#docker-daemon-attack-surface) for details.
|
||||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into Ubuntu as a user with `sudo` privileges.
|
||||
|
||||
This procedure assumes you log in as the `ubuntu` user.
|
||||
|
||||
3. Create the `docker` group and add your user.
|
||||
|
||||
$ sudo usermod -aG docker ubuntu
|
||||
|
||||
3. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
4. Verify your work by running `docker` without `sudo`.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
If this fails with a message similar to this:
|
||||
|
||||
Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?
|
||||
|
||||
Check that the `DOCKER_HOST` environment variable is not set for your shell.
|
||||
If it is, unset it.
|
||||
|
||||
### Adjust memory and swap accounting
|
||||
|
||||
When users run Docker, they may see these messages when working with an image:
|
||||
|
||||
WARNING: Your kernel does not support cgroup swap limit. WARNING: Your
|
||||
kernel does not support swap limit capabilities. Limitation discarded.
|
||||
|
||||
To prevent these messages, enable memory and swap accounting on your
|
||||
system. Enabling memory and swap accounting does induce both a memory
|
||||
overhead and a performance degradation even when Docker is not in
|
||||
use. The memory overhead is about 1% of the total available
|
||||
memory. The performance degradation is roughly 10%.
|
||||
|
||||
To enable memory and swap on system using GNU GRUB (GNU GRand Unified
|
||||
Bootloader), do the following:
|
||||
|
||||
1. Log into Ubuntu as a user with `sudo` privileges.
|
||||
|
||||
2. Edit the `/etc/default/grub` file.
|
||||
|
||||
3. Set the `GRUB_CMDLINE_LINUX` value as follows:
|
||||
|
||||
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
|
||||
|
||||
4. Save and close the file.
|
||||
|
||||
5. Update GRUB.
|
||||
|
||||
$ sudo update-grub
|
||||
|
||||
6. Reboot your system.
|
||||
|
||||
|
||||
### Enable UFW forwarding
|
||||
|
||||
If you use [UFW (Uncomplicated Firewall)](https://help.ubuntu.com/community/UFW)
|
||||
on the same host as you run Docker, you'll need to do additional configuration.
|
||||
Docker uses a bridge to manage container networking. By default, UFW drops all
|
||||
forwarding traffic. As a result, for Docker to run when UFW is
|
||||
enabled, you must set UFW's forwarding policy appropriately.
|
||||
|
||||
Also, UFW's default set of rules denies all incoming traffic. If you want to
|
||||
reach your containers from another host allow incoming connections on the Docker
|
||||
port. The Docker port defaults to `2376` if TLS is enabled or `2375` when it is
|
||||
not. If TLS is not enabled, communication is unencrypted. By default, Docker
|
||||
runs without TLS enabled.
|
||||
|
||||
To configure UFW and allow incoming connections on the Docker port:
|
||||
|
||||
1. Log into Ubuntu as a user with `sudo` privileges.
|
||||
|
||||
2. Verify that UFW is installed and enabled.
|
||||
|
||||
$ sudo ufw status
|
||||
|
||||
3. Open the `/etc/default/ufw` file for editing.
|
||||
|
||||
$ sudo nano /etc/default/ufw
|
||||
|
||||
4. Set the `DEFAULT_FORWARD_POLICY` policy to:
|
||||
|
||||
DEFAULT_FORWARD_POLICY="ACCEPT"
|
||||
|
||||
5. Save and close the file.
|
||||
|
||||
6. Reload UFW to use the new setting.
|
||||
|
||||
$ sudo ufw reload
|
||||
|
||||
7. Allow incoming connections on the Docker port.
|
||||
|
||||
$ sudo ufw allow 2375/tcp
|
||||
|
||||
### Configure a DNS server for use by Docker
|
||||
|
||||
Systems that run Ubuntu or an Ubuntu derivative on the desktop typically use
|
||||
`127.0.0.1` as the default `nameserver` in `/etc/resolv.conf` file. The
|
||||
NetworkManager also sets up `dnsmasq` to use the real DNS servers of the
|
||||
connection and sets up `nameserver 127.0.0.1` in /`etc/resolv.conf`.
|
||||
|
||||
When starting containers on desktop machines with these configurations, Docker
|
||||
users see this warning:
|
||||
|
||||
WARNING: Local (127.0.0.1) DNS resolver found in resolv.conf and containers
|
||||
can't use it. Using default external servers : [8.8.8.8 8.8.4.4]
|
||||
|
||||
The warning occurs because Docker containers can't use the local DNS nameserver.
|
||||
Instead, Docker defaults to using an external nameserver.
|
||||
|
||||
To avoid this warning, you can specify a DNS server for use by Docker
|
||||
containers. Or, you can disable `dnsmasq` in NetworkManager. Though, disabling
|
||||
`dnsmasq` might make DNS resolution slower on some networks.
|
||||
|
||||
The instructions below describe how to configure the Docker daemon
|
||||
running on Ubuntu 14.10 or below. Ubuntu 15.04 and above use `systemd`
|
||||
as the boot and service manager. Refer to [control and configure Docker
|
||||
with systemd](../../admin/systemd.md#custom-docker-daemon-options) to
|
||||
configure a daemon controlled by `systemd`.
|
||||
|
||||
To specify a DNS server for use by Docker:
|
||||
|
||||
1. Log into Ubuntu as a user with `sudo` privileges.
|
||||
|
||||
2. Open the `/etc/default/docker` file for editing.
|
||||
|
||||
$ sudo nano /etc/default/docker
|
||||
|
||||
3. Add a setting for Docker.
|
||||
|
||||
DOCKER_OPTS="--dns 8.8.8.8"
|
||||
|
||||
Replace `8.8.8.8` with a local DNS server such as `192.168.1.1`. You can also
|
||||
specify multiple DNS servers. Separated them with spaces, for example:
|
||||
|
||||
--dns 8.8.8.8 --dns 192.168.1.1
|
||||
|
||||
>**Warning**: If you're doing this on a laptop which connects to various
|
||||
>networks, make sure to choose a public DNS server.
|
||||
|
||||
4. Save and close the file.
|
||||
|
||||
5. Restart the Docker daemon.
|
||||
|
||||
$ sudo restart docker
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**Or, as an alternative to the previous procedure,** disable `dnsmasq` in
|
||||
NetworkManager (this might slow your network).
|
||||
|
||||
1. Open the `/etc/NetworkManager/NetworkManager.conf` file for editing.
|
||||
|
||||
$ sudo nano /etc/NetworkManager/NetworkManager.conf
|
||||
|
||||
2. Comment out the `dns=dnsmasq` line:
|
||||
|
||||
dns=dnsmasq
|
||||
|
||||
3. Save and close the file.
|
||||
|
||||
4. Restart both the NetworkManager and Docker.
|
||||
|
||||
$ sudo restart network-manager
|
||||
$ sudo restart docker
|
||||
|
||||
### Configure Docker to start on boot
|
||||
|
||||
Ubuntu uses `systemd` as its boot and service manager `15.04` onwards and `upstart`
|
||||
for versions `14.10` and below.
|
||||
|
||||
For `15.04` and up, to configure the `docker` daemon to start on boot, run
|
||||
|
||||
$ sudo systemctl enable docker
|
||||
|
||||
For `14.10` and below the above installation method automatically configures `upstart`
|
||||
to start the docker daemon on boot
|
||||
|
||||
## Upgrade Docker
|
||||
|
||||
To install the latest version of Docker with `apt-get`:
|
||||
|
||||
$ sudo apt-get upgrade docker-engine
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To uninstall the Docker package:
|
||||
|
||||
$ sudo apt-get purge docker-engine
|
||||
|
||||
To uninstall the Docker package and dependencies that are no longer needed:
|
||||
|
||||
$ sudo apt-get autoremove --purge docker-engine
|
||||
|
||||
The above commands will not remove images, containers, volumes, or user created
|
||||
configuration files on your host. If you wish to delete all images, containers,
|
||||
and volumes run the following command:
|
||||
|
||||
$ rm -rf /var/lib/docker
|
||||
|
||||
You must delete the user created configuration files manually.
|
||||
435
vendor/github.com/hyperhq/hypercli/docs/installation/mac.md
generated
vendored
Normal file
@@ -0,0 +1,435 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation on Mac OS X"
|
||||
description = "Instructions for installing Docker on OS X using boot2docker."
|
||||
keywords = ["Docker, Docker documentation, requirements, boot2docker, VirtualBox, SSH, Linux, OSX, OS X, Mac"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight="-90"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Mac OS X
|
||||
|
||||
> **Note**: This release of Docker deprecates the Boot2Docker command line in
|
||||
> favor of Docker Machine. Use the Docker Toolbox to install Docker Machine as
|
||||
> well as the other Docker tools.
|
||||
|
||||
You install Docker using Docker Toolbox. Docker Toolbox includes the following Docker tools:
|
||||
|
||||
* Docker Machine for running the `docker-machine` binary
|
||||
* Docker Engine for running the `docker` binary
|
||||
* Docker Compose for running the `docker-compose` binary
|
||||
* Kitematic, the Docker GUI
|
||||
* a shell preconfigured for a Docker command-line environment
|
||||
* Oracle VM VirtualBox
|
||||
|
||||
Because the Docker daemon uses Linux-specific kernel features, you can't run
|
||||
Docker natively in OS X. Instead, you must use `docker-machine` to create and
|
||||
attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker
|
||||
for you on your Mac.
|
||||
|
||||
**Requirements**
|
||||
|
||||
Your Mac must be running OS X 10.8 "Mountain Lion" or newer to install the
|
||||
Docker Toolbox.
|
||||
|
||||
### Learn the key concepts before installing
|
||||
|
||||
In a Docker installation on Linux, your physical machine is both the localhost
|
||||
and the Docker host. In networking, localhost means your computer. The Docker
|
||||
host is the computer on which the containers run.
|
||||
|
||||
On a typical Linux installation, the Docker client, the Docker daemon, and any
|
||||
containers run directly on your localhost. This means you can address ports on a
|
||||
Docker container using standard localhost addressing such as `localhost:8000` or
|
||||
`0.0.0.0:8376`.
|
||||
|
||||

|
||||
|
||||
In an OS X installation, the `docker` daemon is running inside a Linux VM called
|
||||
`default`. The `default` is a lightweight Linux VM made specifically to run
|
||||
the Docker daemon on Mac OS X. The VM runs completely from RAM, is a small ~24MB
|
||||
download, and boots in approximately 5s.
|
||||
|
||||

|
||||
|
||||
In OS X, the Docker host address is the address of the Linux VM. When you start
|
||||
the VM with `docker-machine` it is assigned an IP address. When you start a
|
||||
container, the ports on a container map to ports on the VM. To see this in
|
||||
practice, work through the exercises on this page.
|
||||
|
||||
|
||||
### Installation
|
||||
|
||||
If you have VirtualBox running, you must shut it down before running the
|
||||
installer.
|
||||
|
||||
1. Go to the [Docker Toolbox](https://www.docker.com/toolbox) page.
|
||||
|
||||
2. Click the installer link to download.
|
||||
|
||||
3. Install Docker Toolbox by double-clicking the package or by right-clicking
|
||||
and choosing "Open" from the pop-up menu.
|
||||
|
||||
The installer launches the "Install Docker Toolbox" dialog.
|
||||
|
||||

|
||||
|
||||
4. Press "Continue" to install the toolbox.
|
||||
|
||||
The installer presents you with options to customize the standard
|
||||
installation.
|
||||
|
||||

|
||||
|
||||
By default, the standard Docker Toolbox installation:
|
||||
|
||||
* installs binaries for the Docker tools in `/usr/local/bin`
|
||||
* makes these binaries available to all users
|
||||
* installs VirtualBox; or updates any existing installation
|
||||
|
||||
Change these defaults by pressing "Customize" or "Change
|
||||
Install Location."
|
||||
|
||||
5. Press "Install" to perform the standard installation.
|
||||
|
||||
The system prompts you for your password.
|
||||
|
||||

|
||||
|
||||
6. Provide your password to continue with the installation.
|
||||
|
||||
When it completes, the installer provides you with some information you can
|
||||
use to complete some common tasks.
|
||||
|
||||

|
||||
|
||||
7. Press "Close" to exit.
|
||||
|
||||
|
||||
## Running a Docker Container
|
||||
|
||||
To run a Docker container, you:
|
||||
|
||||
* create a new (or start an existing) virtual machine that runs Docker.
|
||||
* switch your environment to your new VM
|
||||
* use the `docker` client to create, load, and manage containers
|
||||
|
||||
Once you create a machine, you can reuse it as often as you like. Like any
|
||||
VirtualBox VM, it maintains its configuration between uses.
|
||||
|
||||
There are two ways to use the installed tools, from the Docker Quickstart Terminal or
|
||||
[from your shell](#from-your-shell).
|
||||
|
||||
### From the Docker Quickstart Terminal
|
||||
|
||||
1. Open the "Applications" folder or the "Launchpad".
|
||||
|
||||
2. Find the Docker Quickstart Terminal and double-click to launch it.
|
||||
|
||||
The application:
|
||||
|
||||
* opens a terminal window
|
||||
* creates a `default` VM if it doesn't exists, and starts the VM after
|
||||
* points the terminal environment to this VM
|
||||
|
||||
Once the launch completes, the Docker Quickstart Terminal reports:
|
||||
|
||||

|
||||
|
||||
Now, you can run `docker` commands.
|
||||
|
||||
3. Verify your setup succeeded by running the `hello-world` container.
|
||||
|
||||
$ docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
511136ea3c5a: Pull complete
|
||||
31cbccb51277: Pull complete
|
||||
e45a5af57b00: Pull complete
|
||||
hello-world:latest: The image you are pulling has been verified.
|
||||
Important: image verification is a tech preview feature and should not be
|
||||
relied on to provide security.
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
|
||||
A more typical way to interact with the Docker tools is from your regular shell command line.
|
||||
|
||||
### From your shell
|
||||
|
||||
This section assumes you are running a Bash shell. You may be running a
|
||||
different shell such as C Shell but the commands are the same.
|
||||
|
||||
1. Create a new Docker VM.
|
||||
|
||||
$ docker-machine create --driver virtualbox default
|
||||
Creating VirtualBox VM...
|
||||
Creating SSH key...
|
||||
Starting VirtualBox VM...
|
||||
Starting VM...
|
||||
To see how to connect Docker to this machine, run: docker-machine env default
|
||||
|
||||
This creates a new `default` VM in VirtualBox.
|
||||
|
||||
The command also creates a machine configuration in the
|
||||
`~/.docker/machine/machines/default` directory. You only need to run the
|
||||
`create` command once. Then, you can use `docker-machine` to start, stop,
|
||||
query, and otherwise manage the VM from the command line.
|
||||
|
||||
2. List your available machines.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp://192.168.99.101:2376
|
||||
|
||||
If you have previously installed the deprecated Boot2Docker application or
|
||||
run the Docker Quickstart Terminal, you may have a `dev` VM as well. When you
|
||||
created `default` VM, the `docker-machine` command provided instructions
|
||||
for learning how to connect the VM.
|
||||
|
||||
3. Get the environment commands for your new VM.
|
||||
|
||||
$ docker-machine env default
|
||||
export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://192.168.99.101:2376"
|
||||
export DOCKER_CERT_PATH="/Users/mary/.docker/machine/machines/default"
|
||||
export DOCKER_MACHINE_NAME="default"
|
||||
# Run this command to configure your shell:
|
||||
# eval "$(docker-machine env default)"
|
||||
|
||||
4. Connect your shell to the `default` machine.
|
||||
|
||||
$ eval "$(docker-machine env default)"
|
||||
|
||||
5. Run the `hello-world` container to verify your setup.
|
||||
|
||||
$ docker run hello-world
|
||||
|
||||
|
||||
## Learn about your Toolbox installation
|
||||
|
||||
Toolbox installs the Docker Engine binary, the Docker binary on your system. When you
|
||||
use the Docker Quickstart Terminal or create a `default` VM manually, Docker
|
||||
Machine updates the `~/.docker/machine/machines/default` folder to your
|
||||
system. This folder contains the configuration for the VM.
|
||||
|
||||
You can create multiple VMs on your system with Docker Machine. Therefore, you
|
||||
may end up with multiple VM folders if you have more than one VM. To remove a
|
||||
VM, use the `docker-machine rm <machine-name>` command.
|
||||
|
||||
## Migrate from Boot2Docker
|
||||
|
||||
If you were using Boot2Docker previously, you have a pre-existing Docker
|
||||
`boot2docker-vm` VM on your local system. To allow Docker Machine to manage
|
||||
this older VM, you can migrate it.
|
||||
|
||||
1. Open a terminal or the Docker CLI on your system.
|
||||
|
||||
2. Type the following command.
|
||||
|
||||
$ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
|
||||
|
||||
3. Use the `docker-machine` command to interact with the migrated VM.
|
||||
|
||||
The `docker-machine` subcommands are slightly different than the `boot2docker`
|
||||
subcommands. The table below lists the equivalent `docker-machine` subcommand
|
||||
and what it does:
|
||||
|
||||
| `boot2docker` | `docker-machine` | `docker-machine` description |
|
||||
|----------------|------------------|----------------------------------------------------------|
|
||||
| init | create | Creates a new docker host. |
|
||||
| up | start | Starts a stopped machine. |
|
||||
| ssh | ssh | Runs a command or interactive ssh session on the machine.|
|
||||
| save | - | Not applicable. |
|
||||
| down | stop | Stops a running machine. |
|
||||
| poweroff | stop | Stops a running machine. |
|
||||
| reset | restart | Restarts a running machine. |
|
||||
| config | inspect | Prints machine configuration details. |
|
||||
| status | ls | Lists all machines and their status. |
|
||||
| info | inspect | Displays a machine's details. |
|
||||
| ip | ip | Displays the machine's ip address. |
|
||||
| shellinit | env | Displays shell commands needed to configure your shell to interact with a machine |
|
||||
| delete | rm | Removes a machine. |
|
||||
| download | - | Not applicable. |
|
||||
| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. |
|
||||
|
||||
|
||||
## Example of Docker on Mac OS X
|
||||
|
||||
Work through this section to try some practical container tasks on a VM. At this
|
||||
point, you should have a VM running and be connected to it through your shell.
|
||||
To verify this, run the following commands:
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp://192.168.99.100:2376
|
||||
|
||||
The `ACTIVE` machine, in this case `default`, is the one your environment is pointing to.
|
||||
|
||||
### Access container ports
|
||||
|
||||
1. Start an NGINX container on the DOCKER_HOST.
|
||||
|
||||
$ docker run -d -P --name web nginx
|
||||
|
||||
Normally, the `docker run` commands starts a container, runs it, and then
|
||||
exits. The `-d` flag keeps the container running in the background
|
||||
after the `docker run` command completes. The `-P` flag publishes exposed ports from the
|
||||
container to your local host; this lets you access them from your Mac.
|
||||
|
||||
2. Display your running container with `docker ps` command
|
||||
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
5fb65ff765e9 nginx:latest "nginx -g 'daemon of 3 minutes ago Up 3 minutes 0.0.0.0:49156->443/tcp, 0.0.0.0:49157->80/tcp web
|
||||
|
||||
At this point, you can see `nginx` is running as a daemon.
|
||||
|
||||
3. View just the container's ports.
|
||||
|
||||
$ docker port web
|
||||
443/tcp -> 0.0.0.0:49156
|
||||
80/tcp -> 0.0.0.0:49157
|
||||
|
||||
This tells you that the `web` container's port `80` is mapped to port
|
||||
`49157` on your Docker host.
|
||||
|
||||
4. Enter the `http://localhost:49157` address (`localhost` is `0.0.0.0`) in your browser:
|
||||
|
||||

|
||||
|
||||
This didn't work. The reason it doesn't work is your `DOCKER_HOST` address is
|
||||
not the localhost address (0.0.0.0) but is instead the address of the
|
||||
your Docker VM.
|
||||
|
||||
5. Get the address of the `default` VM.
|
||||
|
||||
$ docker-machine ip default
|
||||
192.168.59.103
|
||||
|
||||
6. Enter the `http://192.168.59.103:49157` address in your browser:
|
||||
|
||||

|
||||
|
||||
Success!
|
||||
|
||||
7. To stop and then remove your running `nginx` container, do the following:
|
||||
|
||||
$ docker stop web
|
||||
$ docker rm web
|
||||
|
||||
### Mount a volume on the container
|
||||
|
||||
When you start a container it automatically shares your `/Users/username` directory
|
||||
with the VM. You can use this share point to mount directories onto your container.
|
||||
The next exercise demonstrates how to do this.
|
||||
|
||||
1. Change to your user `$HOME` directory.
|
||||
|
||||
$ cd $HOME
|
||||
|
||||
2. Make a new `site` directory.
|
||||
|
||||
$ mkdir site
|
||||
|
||||
3. Change into the `site` directory.
|
||||
|
||||
$ cd site
|
||||
|
||||
4. Create a new `index.html` file.
|
||||
|
||||
$ echo "my new site" > index.html
|
||||
|
||||
5. Start a new `nginx` container and replace the `html` folder with your `site` directory.
|
||||
|
||||
$ docker run -d -P -v $HOME/site:/usr/share/nginx/html \
|
||||
--name mysite nginx
|
||||
|
||||
6. Get the `mysite` container's port.
|
||||
|
||||
$ docker port mysite
|
||||
80/tcp -> 0.0.0.0:49166
|
||||
443/tcp -> 0.0.0.0:49165
|
||||
|
||||
7. Open the site in a browser:
|
||||
|
||||

|
||||
|
||||
8. Try adding a page to your `$HOME/site` in real time.
|
||||
|
||||
$ echo "This is cool" > cool.html
|
||||
|
||||
9. Open the new page in the browser.
|
||||
|
||||

|
||||
|
||||
10. Stop and then remove your running `mysite` container.
|
||||
|
||||
$ docker stop mysite
|
||||
$ docker rm mysite
|
||||
|
||||
> **Note**: There is a [known
|
||||
> issue](https://docs.docker.com/machine/drivers/virtualbox/#known-issues) that
|
||||
> may cause files shared with your nginx container to not update correctly as you
|
||||
> modify them on your host.
|
||||
|
||||
## Upgrade Docker Toolbox
|
||||
|
||||
To upgrade Docker Toolbox, download an re-run [the Docker Toolbox
|
||||
installer](https://docker.com/toolbox/).
|
||||
|
||||
|
||||
## Uninstall Docker Toolbox
|
||||
|
||||
To uninstall, do the following:
|
||||
|
||||
1. List your machines.
|
||||
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
dev * virtualbox Running tcp://192.168.99.100:2376
|
||||
my-docker-machine virtualbox Stopped
|
||||
default virtualbox Stopped
|
||||
|
||||
2. Remove each machine.
|
||||
|
||||
$ docker-machine rm dev
|
||||
Successfully removed dev
|
||||
|
||||
Removing a machine deletes its VM from VirtualBox and from the
|
||||
`~/.docker/machine/machines` directory.
|
||||
|
||||
3. Remove the Docker Quickstart Terminal and Kitematic from your "Applications" folder.
|
||||
|
||||
4. Remove the `docker`, `docker-compose`, and `docker-machine` commands from the `/usr/local/bin` folder.
|
||||
|
||||
$ rm /usr/local/bin/docker
|
||||
|
||||
5. Delete the `~/.docker` folder from your system.
|
||||
|
||||
|
||||
## Learning more
|
||||
|
||||
Use `docker-machine help` to list the full command line reference for Docker Machine. For more
|
||||
information about using SSH or SCP to access a VM, see [the Docker Machine
|
||||
documentation](https://docs.docker.com/machine/).
|
||||
|
||||
You can continue with the [Docker User Guide](../userguide/index.md). If you are
|
||||
interested in using the Kitematic GUI, see the [Kitematic user
|
||||
guide](https://docs.docker.com/kitematic/userguide/).
|
||||
379
vendor/github.com/hyperhq/hypercli/docs/installation/windows.md
generated
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation on Windows"
|
||||
description = "Docker installation on Microsoft Windows"
|
||||
keywords = ["Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight="-80"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Windows
|
||||
|
||||
> **Note**: This release of Docker deprecates the Boot2Docker command line in
|
||||
> favor of Docker Machine. Use the Docker Toolbox to install Docker Machine as
|
||||
> well as the other Docker tools.
|
||||
|
||||
You install Docker using Docker Toolbox. Docker Toolbox includes the following Docker tools:
|
||||
|
||||
* Docker Machine for running the `docker-machine` binary
|
||||
* Docker Engine for running the `docker` binary
|
||||
* Kitematic, the Docker GUI
|
||||
* a shell preconfigured for a Docker command-line environment
|
||||
* Oracle VM VirtualBox
|
||||
|
||||
Because the Docker daemon uses Linux-specific kernel features, you can't run
|
||||
Docker natively in Windows. Instead, you must use `docker-machine` to create and attach to a Docker VM on your machine. This VM hosts Docker for you on your Windows system.
|
||||
|
||||
The virtual machine runs a lightweight Linux distribution made specifically to
|
||||
run the Docker daemon. The VirtualBox VM runs completely from RAM, is a small
|
||||
~24MB download, and boots in approximately 5s.
|
||||
|
||||
## Requirements
|
||||
|
||||
To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine.
|
||||
To verify your machine meets these requirements, do the following:
|
||||
|
||||
1. Right click the Windows Start Menu and choose **System**.
|
||||
|
||||

|
||||
|
||||
If you are using an unsupported version of Windows, you should consider
|
||||
upgrading your operating system in order to try out Docker.
|
||||
|
||||
2. Make sure your CPU supports [virtualization technology](https://en.wikipedia.org/wiki/X86_virtualization)
|
||||
and virtualization support is enabled in BIOS and recognized by Windows.
|
||||
|
||||
#### For Windows 8, 8.1 or 10
|
||||
|
||||
Choose **Start > Task Manager**. On Windows 10, click more details. Navigate to the **Performance** tab.
|
||||
Under **CPU** you should see the following:
|
||||
|
||||

|
||||
|
||||
If virtualization is not enabled on your system, follow the manufacturer's instructions for enabling it.
|
||||
|
||||
#### For Windows 7
|
||||
|
||||
Run the <a
|
||||
href="http://www.microsoft.com/en-us/download/details.aspx?id=592"
|
||||
target="_blank"> Microsoft® Hardware-Assisted Virtualization Detection
|
||||
Tool</a> and follow the on-screen instructions.
|
||||
|
||||
3. Verify your Windows OS is 64-bit (x64)
|
||||
|
||||
How you do this verification depends on your Windows version. For details, see the Windows
|
||||
article [How to determine whether a computer is running a 32-bit version or 64-bit version
|
||||
of the Windows operating system](https://support.microsoft.com/en-us/kb/827218).
|
||||
|
||||
> **Note**: If you have Docker hosts running and you don't wish to do a Docker Toolbox
|
||||
installation, you can install the `docker.exe` using the *unofficial* Windows package
|
||||
manager Chocolately. For information on how to do this, see [Docker package on
|
||||
Chocolatey](http://chocolatey.org/packages/docker).
|
||||
|
||||
### Learn the key concepts before installing
|
||||
|
||||
In a Docker installation on Linux, your machine is both the localhost and the
|
||||
Docker host. In networking, localhost means your computer. The Docker host is
|
||||
the machine on which the containers run.
|
||||
|
||||
On a typical Linux installation, the Docker client, the Docker daemon, and any
|
||||
containers run directly on your localhost. This means you can address ports on a
|
||||
Docker container using standard localhost addressing such as `localhost:8000` or
|
||||
`0.0.0.0:8376`.
|
||||
|
||||

|
||||
|
||||
In an Windows installation, the `docker` daemon is running inside a Linux virtual
|
||||
machine. You use the Windows Docker client to talk to the Docker host VM. Your
|
||||
Docker containers run inside this host.
|
||||
|
||||

|
||||
|
||||
In Windows, the Docker host address is the address of the Linux VM. When you
|
||||
start the VM with `docker-machine` it is assigned an IP address. When you start
|
||||
a container, the ports on a container map to ports on the VM. To see this in
|
||||
practice, work through the exercises on this page.
|
||||
|
||||
|
||||
### Installation
|
||||
|
||||
If you have VirtualBox running, you must shut it down before running the
|
||||
installer.
|
||||
|
||||
1. Go to the [Docker Toolbox](https://www.docker.com/toolbox) page.
|
||||
|
||||
2. Click the installer link to download.
|
||||
|
||||
3. Install Docker Toolbox by double-clicking the installer.
|
||||
|
||||
The installer launches the "Setup - Docker Toolbox" dialog.
|
||||
|
||||

|
||||
|
||||
4. Press "Next" to install the toolbox.
|
||||
|
||||
The installer presents you with options to customize the standard
|
||||
installation. By default, the standard Docker Toolbox installation:
|
||||
|
||||
* installs executables for the Docker tools in `C:\Program Files\Docker Toolbox`
|
||||
* install VirtualBox; or updates any existing installation
|
||||
* adds a Docker Inc. folder to your program shortcuts
|
||||
* updates your `PATH` environment variable
|
||||
* adds desktop icons for the Docker Quickstart Terminal and Kitematic
|
||||
|
||||
This installation assumes the defaults are acceptable.
|
||||
|
||||
5. Press "Next" until you reach the "Ready to Install" page.
|
||||
|
||||
The system prompts you for your password.
|
||||
|
||||

|
||||
|
||||
6. Press "Install" to continue with the installation.
|
||||
|
||||
When it completes, the installer provides you with some information you can
|
||||
use to complete some common tasks.
|
||||
|
||||

|
||||
|
||||
7. Press "Finish" to exit.
|
||||
|
||||
## Running a Docker Container
|
||||
|
||||
To run a Docker container, you:
|
||||
|
||||
* create a new (or start an existing) Docker virtual machine
|
||||
* switch your environment to your new VM
|
||||
* use the `docker` client to create, load, and manage containers
|
||||
|
||||
Once you create a machine, you can reuse it as often as you like. Like any
|
||||
VirtualBox VM, it maintains its configuration between uses.
|
||||
|
||||
There are several ways to use the installed tools, from the Docker Quickstart Terminal or
|
||||
[from your shell](#from-your-shell).
|
||||
|
||||
### Using the Docker Quickstart Terminal
|
||||
|
||||
1. Find the Docker Quickstart Terminal icon on your Desktop and double-click to launch it.
|
||||
|
||||
The application:
|
||||
|
||||
* opens a terminal window
|
||||
* creates a `default` VM if it doesn't exist, and starts the VM after
|
||||
* points the terminal environment to this VM
|
||||
|
||||
Once the launch completes, you can run `docker` commands.
|
||||
|
||||
3. Verify your setup succeeded by running the `hello-world` container.
|
||||
|
||||
$ docker run hello-world
|
||||
Unable to find image 'hello-world:latest' locally
|
||||
511136ea3c5a: Pull complete
|
||||
31cbccb51277: Pull complete
|
||||
e45a5af57b00: Pull complete
|
||||
hello-world:latest: The image you are pulling has been verified.
|
||||
Important: image verification is a tech preview feature and should not be
|
||||
relied on to provide security.
|
||||
Status: Downloaded newer image for hello-world:latest
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
|
||||
To generate this message, Docker took the following steps:
|
||||
1. The Docker client contacted the Docker daemon.
|
||||
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
|
||||
(Assuming it was not already locally available.)
|
||||
3. The Docker daemon created a new container from that image which runs the
|
||||
executable that produces the output you are currently reading.
|
||||
4. The Docker daemon streamed that output to the Docker client, which sent it
|
||||
to your terminal.
|
||||
|
||||
To try something more ambitious, you can run an Ubuntu container with:
|
||||
$ docker run -it ubuntu bash
|
||||
|
||||
For more examples and ideas, visit:
|
||||
http://docs.docker.com/userguide/
|
||||
|
||||
|
||||
### Using Docker from Windows Command Prompt (cmd.exe)
|
||||
|
||||
1. Launch a Windows Command Prompt (cmd.exe).
|
||||
|
||||
The `docker-machine` command requires `ssh.exe` in your `PATH` environment
|
||||
variable. This `.exe` is in the MsysGit `bin` folder.
|
||||
|
||||
2. Add this to the `%PATH%` environment variable by running:
|
||||
|
||||
set PATH=%PATH%;"c:\Program Files (x86)\Git\bin"
|
||||
|
||||
3. Create a new Docker VM.
|
||||
|
||||
docker-machine create --driver virtualbox my-default
|
||||
Creating VirtualBox VM...
|
||||
Creating SSH key...
|
||||
Starting VirtualBox VM...
|
||||
Starting VM...
|
||||
To see how to connect Docker to this machine, run: docker-machine env my-default
|
||||
|
||||
The command also creates a machine configuration in the
|
||||
`C:\USERS\USERNAME\.docker\machine\machines` directory. You only need to run the `create`
|
||||
command once. Then, you can use `docker-machine` to start, stop, query, and
|
||||
otherwise manage the VM from the command line.
|
||||
|
||||
4. List your available machines.
|
||||
|
||||
C:\Users\mary> docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
my-default * virtualbox Running tcp://192.168.99.101:2376
|
||||
|
||||
If you have previously installed the deprecated Boot2Docker application or
|
||||
run the Docker Quickstart Terminal, you may have a `dev` VM as well.
|
||||
|
||||
5. Get the environment commands for your new VM.
|
||||
|
||||
C:\Users\mary> docker-machine env --shell cmd my-default
|
||||
|
||||
6. Connect your shell to the `my-default` machine.
|
||||
|
||||
C:\Users\mary> eval "$(docker-machine env my-default)"
|
||||
|
||||
7. Run the `hello-world` container to verify your setup.
|
||||
|
||||
C:\Users\mary> docker run hello-world
|
||||
|
||||
### Using Docker from PowerShell
|
||||
|
||||
1. Launch a Windows PowerShell window.
|
||||
|
||||
2. Add `ssh.exe` to your PATH:
|
||||
|
||||
PS C:\Users\mary> $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
|
||||
|
||||
3. Create a new Docker VM.
|
||||
|
||||
PS C:\Users\mary> docker-machine create --driver virtualbox my-default
|
||||
|
||||
4. List your available machines.
|
||||
|
||||
C:\Users\mary> docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
my-default * virtualbox Running tcp://192.168.99.101:2376
|
||||
|
||||
5. Get the environment commands for your new VM.
|
||||
|
||||
C:\Users\mary> docker-machine env --shell powershell my-default
|
||||
|
||||
6. Connect your shell to the `my-default` machine.
|
||||
|
||||
C:\Users\mary> eval "$(docker-machine env my-default)"
|
||||
|
||||
7. Run the `hello-world` container to verify your setup.
|
||||
|
||||
C:\Users\mary> docker run hello-world
|
||||
|
||||
|
||||
## Learn about your Toolbox installation
|
||||
|
||||
Toolbox installs the Docker Engine binary in the `C:\Program Files\Docker
|
||||
Toolbox` directory. When you use the Docker Quickstart Terminal or create a
|
||||
`default` VM manually, Docker Machine updates the
|
||||
`C:\USERS\USERNAME\.docker\machine\machines\default` folder to your
|
||||
system. This folder contains the configuration for the VM.
|
||||
|
||||
You can create multiple VMs on your system with Docker Machine. Therefore, you
|
||||
may end up with multiple VM folders if you have created more than one VM. To
|
||||
remove a VM, use the `docker-machine rm <machine-name>` command.
|
||||
|
||||
## Migrate from Boot2Docker
|
||||
|
||||
If you were using Boot2Docker previously, you have a pre-existing Docker
|
||||
`boot2docker-vm` VM on your local system. To allow Docker Machine to manage
|
||||
this older VM, you can migrate it.
|
||||
|
||||
1. Open a terminal or the Docker CLI on your system.
|
||||
|
||||
2. Type the following command.
|
||||
|
||||
$ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
|
||||
|
||||
3. Use the `docker-machine` command to interact with the migrated VM.
|
||||
|
||||
The `docker-machine` subcommands are slightly different than the `boot2docker`
|
||||
subcommands. The table below lists the equivalent `docker-machine` subcommand
|
||||
and what it does:
|
||||
|
||||
| `boot2docker` | `docker-machine` | `docker-machine` description |
|
||||
|----------------|------------------|----------------------------------------------------------|
|
||||
| init | create | Creates a new docker host. |
|
||||
| up | start | Starts a stopped machine. |
|
||||
| ssh | ssh | Runs a command or interactive ssh session on the machine.|
|
||||
| save | - | Not applicable. |
|
||||
| down | stop | Stops a running machine. |
|
||||
| poweroff | stop | Stops a running machine. |
|
||||
| reset | restart | Restarts a running machine. |
|
||||
| config | inspect | Prints machine configuration details. |
|
||||
| status | ls | Lists all machines and their status. |
|
||||
| info | inspect | Displays a machine's details. |
|
||||
| ip | ip | Displays the machine's ip address. |
|
||||
| shellinit | env | Displays shell commands needed to configure your shell to interact with a machine |
|
||||
| delete | rm | Removes a machine. |
|
||||
| download | - | Not applicable. |
|
||||
| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. |
|
||||
|
||||
|
||||
## Upgrade Docker Toolbox
|
||||
|
||||
To upgrade Docker Toolbox, download an re-run [the Docker Toolbox
|
||||
installer](https://www.docker.com/toolbox).
|
||||
|
||||
## Container port redirection
|
||||
|
||||
If you are curious, the username for the Docker default VM is `docker` and the
|
||||
password is `tcuser`. The latest version of `docker-machine` sets up a host only
|
||||
network adaptor which provides access to the container's ports.
|
||||
|
||||
If you run a container with a published port:
|
||||
|
||||
$ docker run --rm -i -t -p 80:80 nginx
|
||||
|
||||
Then you should be able to access that nginx server using the IP address
|
||||
reported to you using:
|
||||
|
||||
$ docker-machine ip
|
||||
|
||||
Typically, the IP is 192.168.59.103, but it could get changed by VirtualBox's
|
||||
DHCP implementation.
|
||||
|
||||
> **Note**: There is a [known
|
||||
> issue](https://docs.docker.com/machine/drivers/virtualbox/#known-issues) that
|
||||
> may cause files shared with your nginx container to not update correctly as you
|
||||
> modify them on your host.
|
||||
|
||||
## Login with PUTTY instead of using the CMD
|
||||
|
||||
Docker Machine generates and uses the public/private key pair in your
|
||||
`%USERPROFILE%\.ssh` directory so to log in you need to use the private key from
|
||||
this same directory. The private key needs to be converted into the format PuTTY
|
||||
uses. You can do this with
|
||||
[puttygen](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html):
|
||||
|
||||
1. Open `puttygen.exe` and load ("File"->"Load" menu) the private key from (you may need to change to the `All Files (*.*)` filter)
|
||||
|
||||
%USERPROFILE%\.docker\machine\machines\<name_of_your_machine>\id_rsa
|
||||
|
||||
2. Click "Save Private Key".
|
||||
|
||||
3. Use the saved file to login with PuTTY using `docker@127.0.0.1:2022`.
|
||||
|
||||
## Uninstallation
|
||||
|
||||
You can uninstall Docker Toolbox using Window's standard process for removing
|
||||
programs. This process does not remove the `docker-install.exe` file. You must
|
||||
delete that file yourself.
|
||||
|
||||
## Learn more
|
||||
|
||||
You can continue with the [Docker User Guide](../userguide/index.md). If you are
|
||||
interested in using the Kitematic GUI, see the [Kitematic user
|
||||
guide](https://docs.docker.com/kitematic/userguide/).
|
||||