mirror of https://github.com/docker/docs.git
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
95d87f1ac0
|
@ -37,7 +37,7 @@ def v10(config)
|
||||||
# Share an additional folder to the guest VM. The first argument is
|
# Share an additional folder to the guest VM. The first argument is
|
||||||
# an identifier, the second is the path on the guest to mount the
|
# an identifier, the second is the path on the guest to mount the
|
||||||
# folder, and the third is the path on the host to the actual folder.
|
# folder, and the third is the path on the host to the actual folder.
|
||||||
config.vm.share_folder "v-data", "~/docker", "~/docker"
|
config.vm.share_folder "v-data", "~/docker", File.dirname(__FILE__)
|
||||||
|
|
||||||
# Enable provisioning with Puppet stand alone. Puppet manifests
|
# Enable provisioning with Puppet stand alone. Puppet manifests
|
||||||
# are contained in a directory path relative to this Vagrantfile.
|
# are contained in a directory path relative to this Vagrantfile.
|
||||||
|
@ -119,10 +119,11 @@ end
|
||||||
aws.keypair_name = ENV["AWS_KEYPAIR_NAME"]
|
aws.keypair_name = ENV["AWS_KEYPAIR_NAME"]
|
||||||
aws.ssh_private_key_path = ENV["AWS_SSH_PRIVKEY"]
|
aws.ssh_private_key_path = ENV["AWS_SSH_PRIVKEY"]
|
||||||
aws.region = "us-east-1"
|
aws.region = "us-east-1"
|
||||||
aws.ami = "ami-1c1e8075"
|
aws.ami = "ami-ae9806c7"
|
||||||
aws.ssh_username = "vagrant"
|
aws.ssh_username = "ubuntu"
|
||||||
aws.instance_type = "t1.micro"
|
aws.instance_type = "t1.micro"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provider :rackspace do |rs|
|
config.vm.provider :rackspace do |rs|
|
||||||
config.vm.box = "dummy"
|
config.vm.box = "dummy"
|
||||||
config.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box"
|
config.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box"
|
||||||
|
@ -133,6 +134,7 @@ end
|
||||||
rs.flavor = /512MB/
|
rs.flavor = /512MB/
|
||||||
rs.image = /Ubuntu/
|
rs.image = /Ubuntu/
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
config.vm.box = "quantal64_3.5.0-25"
|
config.vm.box = "quantal64_3.5.0-25"
|
||||||
config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box"
|
config.vm.box_url = "http://get.docker.io/vbox/ubuntu/12.10/quantal64_3.5.0-25.box"
|
||||||
|
|
|
@ -43,7 +43,7 @@ func (srv *Server) Help() string {
|
||||||
{"logs", "Fetch the logs of a container"},
|
{"logs", "Fetch the logs of a container"},
|
||||||
{"port", "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"},
|
{"port", "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"},
|
||||||
{"ps", "List containers"},
|
{"ps", "List containers"},
|
||||||
{"pull", "Pull an image or a repository to the docker registry server"},
|
{"pull", "Pull an image or a repository from the docker registry server"},
|
||||||
{"push", "Push an image or a repository to the docker registry server"},
|
{"push", "Push an image or a repository to the docker registry server"},
|
||||||
{"restart", "Restart a running container"},
|
{"restart", "Restart a running container"},
|
||||||
{"rm", "Remove a container"},
|
{"rm", "Remove a container"},
|
||||||
|
|
|
@ -49,6 +49,8 @@ docs:
|
||||||
cp sources/index.html $(BUILDDIR)/html/
|
cp sources/index.html $(BUILDDIR)/html/
|
||||||
cp sources/gettingstarted.html $(BUILDDIR)/html/
|
cp sources/gettingstarted.html $(BUILDDIR)/html/
|
||||||
cp sources/dotcloud.yml $(BUILDDIR)/html/
|
cp sources/dotcloud.yml $(BUILDDIR)/html/
|
||||||
|
cp sources/CNAME $(BUILDDIR)/html/
|
||||||
|
cp sources/.nojekyll $(BUILDDIR)/html/
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
docker.io
|
|
@ -13,11 +13,11 @@ Running an interactive shell
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Download a base image
|
# Download a base image
|
||||||
docker import base
|
docker pull base
|
||||||
|
|
||||||
# Run an interactive shell in the base image,
|
# Run an interactive shell in the base image,
|
||||||
# allocate a tty, attach stdin and stdout
|
# allocate a tty, attach stdin and stdout
|
||||||
docker run -a -i -t base /bin/bash
|
docker run -i -t base /bin/bash
|
||||||
|
|
||||||
|
|
||||||
Starting a long-running worker process
|
Starting a long-running worker process
|
||||||
|
@ -26,10 +26,10 @@ Starting a long-running worker process
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Run docker in daemon mode
|
# Run docker in daemon mode
|
||||||
(docker -d || echo "Docker daemon already running") &
|
(sudo docker -d || echo "Docker daemon already running") &
|
||||||
|
|
||||||
# Start a very useful long-running process
|
# Start a very useful long-running process
|
||||||
JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done")
|
JOB=$(docker run -d base /bin/sh -c "while true; do echo Hello world; sleep 1; done")
|
||||||
|
|
||||||
# Collect the output of the job so far
|
# Collect the output of the job so far
|
||||||
docker logs $JOB
|
docker logs $JOB
|
||||||
|
@ -51,7 +51,7 @@ Expose a service on a TCP port
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Expose port 4444 of this container, and tell netcat to listen on it
|
# Expose port 4444 of this container, and tell netcat to listen on it
|
||||||
JOB=$(docker run -p 4444 base /bin/nc -l -p 4444)
|
JOB=$(docker run -d -p 4444 base /bin/nc -l -p 4444)
|
||||||
|
|
||||||
# Which public port is NATed to my container?
|
# Which public port is NATed to my container?
|
||||||
PORT=$(docker port $JOB 4444)
|
PORT=$(docker port $JOB 4444)
|
||||||
|
|
|
@ -12,9 +12,9 @@ The goal of this example is to show you how you can author your own docker image
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ docker import shykes/pybuilder
|
$ docker pull shykes/pybuilder
|
||||||
|
|
||||||
We are importing the "shykes/pybuilder" docker image
|
We are downloading the "shykes/pybuilder" docker image
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Mac OS X and other linux
|
Mac OS X and other linux
|
||||||
========================
|
========================
|
||||||
|
|
||||||
Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
|
Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
|
||||||
may be out of date because it depends on some binaries to be updated and published
|
may be out of date because it depends on some binaries to be updated and published
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Windows
|
Windows
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
|
Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
|
||||||
may be out of date because it depends on some binaries to be updated and published
|
may be out of date because it depends on some binaries to be updated and published
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ You are now ready for the docker’s “hello world” example. Run
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
docker run -a busybox echo hello world
|
docker run busybox echo hello world
|
||||||
|
|
||||||
.. image:: images/win/run_04.gif
|
.. image:: images/win/run_04.gif
|
||||||
:alt: run docker
|
:alt: run docker
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 194 KiB |
|
@ -1,12 +1,26 @@
|
||||||
class virtualbox {
|
class virtualbox {
|
||||||
Package { ensure => "installed" }
|
Package { ensure => "installed" }
|
||||||
|
|
||||||
|
user { "vagrant":
|
||||||
|
name => "vagrant",
|
||||||
|
ensure => present,
|
||||||
|
comment => "Vagrant User",
|
||||||
|
shell => "/bin/bash",
|
||||||
|
home => "/home/vagrant",
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/home/vagrant":
|
||||||
|
mode => 644,
|
||||||
|
require => User["vagrant"],
|
||||||
|
}
|
||||||
|
|
||||||
# remove some files from the base vagrant image because they're old
|
# remove some files from the base vagrant image because they're old
|
||||||
file { "/home/vagrant/docker-master":
|
file { "/home/vagrant/docker-master":
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
recurse => true,
|
recurse => true,
|
||||||
force => true,
|
force => true,
|
||||||
purge => true,
|
purge => true,
|
||||||
|
require => File["/home/vagrant"],
|
||||||
}
|
}
|
||||||
file { "/usr/local/bin/dockerd":
|
file { "/usr/local/bin/dockerd":
|
||||||
ensure => absent,
|
ensure => absent,
|
||||||
|
@ -23,9 +37,33 @@ class virtualbox {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ec2 {
|
class ec2 {
|
||||||
|
user { "vagrant":
|
||||||
|
name => "ubuntu",
|
||||||
|
ensure => present,
|
||||||
|
comment => "Vagrant User",
|
||||||
|
shell => "/bin/bash",
|
||||||
|
home => "/home/ubuntu",
|
||||||
|
}
|
||||||
|
file { "/home/vagrant":
|
||||||
|
ensure => link,
|
||||||
|
target => "/home/ubuntu",
|
||||||
|
require => User["vagrant"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class rax {
|
class rax {
|
||||||
|
user { "vagrant":
|
||||||
|
name => "ubuntu",
|
||||||
|
ensure => present,
|
||||||
|
comment => "Vagrant User",
|
||||||
|
shell => "/bin/bash",
|
||||||
|
home => "/home/ubuntu",
|
||||||
|
}
|
||||||
|
file { "/home/vagrant":
|
||||||
|
ensure => link,
|
||||||
|
target => "/home/ubuntu",
|
||||||
|
require => User["vagrant"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class docker {
|
class docker {
|
||||||
|
@ -49,43 +87,17 @@ class docker {
|
||||||
$rax_version = inline_template("<%= %x{/usr/bin/xenstore-read vm-data/provider_data/provider} %>")
|
$rax_version = inline_template("<%= %x{/usr/bin/xenstore-read vm-data/provider_data/provider} %>")
|
||||||
|
|
||||||
if ($ec2_version) {
|
if ($ec2_version) {
|
||||||
|
$vagrant_user = "ubuntu"
|
||||||
include ec2
|
include ec2
|
||||||
} elsif ($rax_version) {
|
} elsif ($rax_version) {
|
||||||
|
$vagrant_user = "vagrant"
|
||||||
include rax
|
include rax
|
||||||
} else {
|
} else {
|
||||||
# virtualbox is the vagrant default, so it should be safe to assume
|
# virtualbox is the vagrant default, so it should be safe to assume
|
||||||
|
$vagrant_user = "vagrant"
|
||||||
include virtualbox
|
include virtualbox
|
||||||
}
|
}
|
||||||
|
|
||||||
user { "vagrant":
|
|
||||||
ensure => present,
|
|
||||||
comment => "Vagrant User",
|
|
||||||
shell => "/bin/bash",
|
|
||||||
home => "/home/vagrant",
|
|
||||||
groups => [
|
|
||||||
"sudo",
|
|
||||||
"vagrant",
|
|
||||||
"ubuntu",
|
|
||||||
],
|
|
||||||
require => [
|
|
||||||
Group["sudo"],
|
|
||||||
Group["vagrant"],
|
|
||||||
Group["ubuntu"],
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
group { "ubuntu":
|
|
||||||
ensure => present,
|
|
||||||
}
|
|
||||||
|
|
||||||
group { "vagrant":
|
|
||||||
ensure => present,
|
|
||||||
}
|
|
||||||
|
|
||||||
group { "sudo":
|
|
||||||
ensure => present,
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/usr/local/bin":
|
file { "/usr/local/bin":
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => root,
|
owner => root,
|
||||||
|
@ -112,16 +124,10 @@ class docker {
|
||||||
require => Exec["copy-docker-bin"],
|
require => Exec["copy-docker-bin"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/home/vagrant":
|
|
||||||
ensure => directory,
|
|
||||||
mode => 644,
|
|
||||||
require => User["vagrant"],
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/home/vagrant/.profile":
|
file { "/home/vagrant/.profile":
|
||||||
mode => 644,
|
mode => 644,
|
||||||
owner => "vagrant",
|
owner => $vagrant_user,
|
||||||
group => "vagrant",
|
group => "ubuntu",
|
||||||
content => template("docker/profile"),
|
content => template("docker/profile"),
|
||||||
require => File["/home/vagrant"],
|
require => File["/home/vagrant"],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue