1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

merge master

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-01-31 19:00:06 +00:00
commit b881a6c3c2
7 changed files with 48 additions and 41 deletions

View file

@ -879,7 +879,7 @@ func (cli *DockerCli) CmdHistory(args ...string) error {
}
for _, out := range outs.Data {
outID := out.Get("ID")
outID := out.Get("Id")
if !*quiet {
if *noTrunc {
fmt.Fprintf(w, "%s\t", outID)
@ -1171,7 +1171,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
}
if filter != "" {
if filter == image.Get("ID") || filter == utils.TruncateID(image.Get("ID")) {
if filter == image.Get("Id") || filter == utils.TruncateID(image.Get("Id")) {
startImage = image
}
@ -1229,7 +1229,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
for _, repotag := range out.GetList("RepoTags") {
repo, tag := utils.ParseRepositoryTag(repotag)
outID := out.Get("ID")
outID := out.Get("Id")
if !*noTrunc {
outID = utils.TruncateID(outID)
}
@ -1255,12 +1255,12 @@ func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[
for index, image := range images.Data {
if index+1 == length {
printNode(cli, noTrunc, image, prefix+"└─")
if subimages, exists := byParent[image.Get("ID")]; exists {
if subimages, exists := byParent[image.Get("Id")]; exists {
cli.WalkTree(noTrunc, subimages, byParent, prefix+" ", printNode)
}
} else {
printNode(cli, noTrunc, image, prefix+"\u251C─")
if subimages, exists := byParent[image.Get("ID")]; exists {
if subimages, exists := byParent[image.Get("Id")]; exists {
cli.WalkTree(noTrunc, subimages, byParent, prefix+"\u2502 ", printNode)
}
}
@ -1268,7 +1268,7 @@ func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[
} else {
for _, image := range images.Data {
printNode(cli, noTrunc, image, prefix+"└─")
if subimages, exists := byParent[image.Get("ID")]; exists {
if subimages, exists := byParent[image.Get("Id")]; exists {
cli.WalkTree(noTrunc, subimages, byParent, prefix+" ", printNode)
}
}
@ -1281,10 +1281,10 @@ func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix strin
parentID string
)
if noTrunc {
imageID = image.Get("ID")
imageID = image.Get("Id")
parentID = image.Get("ParentId")
} else {
imageID = utils.TruncateID(image.Get("ID"))
imageID = utils.TruncateID(image.Get("Id"))
parentID = utils.TruncateID(image.Get("ParentId"))
}
if parentID == "" {
@ -1301,9 +1301,9 @@ func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix strin
func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix string) {
var imageID string
if noTrunc {
imageID = image.Get("ID")
imageID = image.Get("Id")
} else {
imageID = utils.TruncateID(image.Get("ID"))
imageID = utils.TruncateID(image.Get("Id"))
}
fmt.Fprintf(cli.out, "%s%s Virtual Size: %s", prefix, imageID, utils.HumanSize(image.GetInt64("VirtualSize")))
@ -1382,7 +1382,7 @@ func (cli *DockerCli) CmdPs(args ...string) error {
for _, out := range outs.Data {
var (
outID = out.Get("ID")
outID = out.Get("Id")
outNames = out.GetList("Names")
)

View file

@ -12,18 +12,22 @@ 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!
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
--------------------------
.. DOC COMMENT: this should be kept in sync with
https://github.com/dotcloud/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies
To run properly, docker needs the following software to be installed at runtime:
- GNU Tar version 1.26 or later
- iproute2 version 3.5 or later (build after 2012-05-21), and specifically the "ip" utility
- iproute2 version 3.5 or later (build after 2012-05-21), and
specifically the "ip" utility
- iptables version 1.4 or later
- The LXC utility scripts (http://lxc.sourceforge.net) version 0.8 or later
- Git version 1.7 or later
@ -33,11 +37,11 @@ To run properly, docker needs the following software to be installed at runtime:
Check kernel dependencies
-------------------------
Docker in daemon mode has specific kernel requirements. For details, see
http://docs.docker.io/en/latest/articles/kernel/
Docker in daemon mode has specific kernel requirements. For details,
check your distribution in :ref:`installation_list`.
Note that Docker also has a client mode, which can run on virtually any linux kernel (it even builds
on OSX!).
Note that Docker also has a client mode, which can run on virtually
any linux kernel (it even builds on OSX!).
Get the docker binary:
@ -63,18 +67,18 @@ Run the docker daemon
Giving non-root access
----------------------
The ``docker`` daemon always runs as the root user, and since Docker version
0.5.2, 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``.
The ``docker`` daemon always runs as the root user, and since Docker
version 0.5.2, 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``.
Starting in version 0.5.3, 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.
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 is root-equivalent.
@ -82,7 +86,8 @@ client commands.
Upgrades
--------
To upgrade your manual installation of Docker, first kill the docker daemon:
To upgrade your manual installation of Docker, first kill the docker
daemon:
.. code-block:: bash

View file

@ -811,6 +811,8 @@ Known Issues (kill)
* :issue:`197` indicates that ``docker kill`` may leave directories
behind and make it difficult to remove the container.
* :issue:`3844` lxc 1.0.0 beta3 removed ``lcx-kill`` which is used by Docker versions before 0.8.0;
see the issue for a workaround.
.. _cli_load:

View file

@ -202,7 +202,7 @@ func TestGetImagesJSON(t *testing.T) {
}
assertHttpNotError(r2, t)
images2 := engine.NewTable("ID", 0)
images2 := engine.NewTable("Id", 0)
if _, err := images2.ReadListFrom(r2.Body.Bytes()); err != nil {
t.Fatal(err)
}
@ -213,7 +213,7 @@ func TestGetImagesJSON(t *testing.T) {
found = false
for _, img := range images2.Data {
if img.Get("ID") == unitTestImageID {
if img.Get("Id") == unitTestImageID {
found = true
break
}
@ -235,7 +235,7 @@ func TestGetImagesJSON(t *testing.T) {
}
assertHttpNotError(r3, t)
images3 := engine.NewTable("ID", 0)
images3 := engine.NewTable("Id", 0)
if _, err := images3.ReadListFrom(r3.Body.Bytes()); err != nil {
t.Fatal(err)
}
@ -334,7 +334,7 @@ func TestGetContainersJSON(t *testing.T) {
if len(containers.Data) != beginLen+1 {
t.Fatalf("Expected %d container, %d found (started with: %d)", beginLen+1, len(containers.Data), beginLen)
}
if id := containers.Data[0].Get("ID"); id != containerID {
if id := containers.Data[0].Get("Id"); id != containerID {
t.Fatalf("Container ID mismatch. Expected: %s, received: %s\n", containerID, id)
}
}

View file

@ -60,8 +60,8 @@ func cleanup(eng *engine.Engine, t *testing.T) error {
t.Fatal(err)
}
for _, image := range images.Data {
if image.Get("ID") != unitTestImageID {
eng.Job("image_delete", image.Get("ID")).Run()
if image.Get("Id") != unitTestImageID {
eng.Job("image_delete", image.Get("Id")).Run()
}
}
return nil

View file

@ -288,7 +288,7 @@ func TestRestartKillWait(t *testing.T) {
}
setTimeout(t, "Waiting on stopped container timedout", 5*time.Second, func() {
job = srv.Eng.Job("wait", outs.Data[0].Get("ID"))
job = srv.Eng.Job("wait", outs.Data[0].Get("Id"))
var statusStr string
job.Stdout.AddString(&statusStr)
if err := job.Run(); err != nil {
@ -472,7 +472,7 @@ func TestRmi(t *testing.T) {
}
for _, image := range images.Data {
if strings.Contains(unitTestImageID, image.Get("ID")) {
if strings.Contains(unitTestImageID, image.Get("Id")) {
continue
}
if image.GetList("RepoTags")[0] == "<none>:<none>" {
@ -650,7 +650,7 @@ func assertContainerList(srv *docker.Server, all bool, limit int, since, before
return false
}
for i := 0; i < len(outs.Data); i++ {
if outs.Data[i].Get("ID") != expected[i] {
if outs.Data[i].Get("Id") != expected[i] {
return false
}
}

View file

@ -777,7 +777,7 @@ func (srv *Server) Images(job *engine.Job) engine.Status {
delete(allImages, id)
out.Set("ParentId", image.Parent)
out.SetList("RepoTags", []string{fmt.Sprintf("%s:%s", name, tag)})
out.Set("ID", image.ID)
out.Set("Id", image.ID)
out.SetInt64("Created", image.Created.Unix())
out.SetInt64("Size", image.Size)
out.SetInt64("VirtualSize", image.getParentsSize(0)+image.Size)
@ -798,7 +798,7 @@ func (srv *Server) Images(job *engine.Job) engine.Status {
out := &engine.Env{}
out.Set("ParentId", image.Parent)
out.SetList("RepoTags", []string{"<none>:<none>"})
out.Set("ID", image.ID)
out.Set("Id", image.ID)
out.SetInt64("Created", image.Created.Unix())
out.SetInt64("Size", image.Size)
out.SetInt64("VirtualSize", image.getParentsSize(0)+image.Size)
@ -880,7 +880,7 @@ func (srv *Server) ImageHistory(job *engine.Job) engine.Status {
outs := engine.NewTable("Created", 0)
err = image.WalkHistory(func(img *Image) error {
out := &engine.Env{}
out.Set("ID", img.ID)
out.Set("Id", img.ID)
out.SetInt64("Created", img.Created.Unix())
out.Set("CreatedBy", strings.Join(img.ContainerConfig.Cmd, " "))
out.SetList("Tags", lookupMap[img.ID])
@ -1028,7 +1028,7 @@ func (srv *Server) Containers(job *engine.Job) engine.Status {
}
displayed++
out := &engine.Env{}
out.Set("ID", container.ID)
out.Set("Id", container.ID)
out.SetList("Names", names[container.ID])
out.Set("Image", srv.runtime.repositories.ImageName(container.Image))
out.Set("Command", fmt.Sprintf("%s %s", container.Path, strings.Join(container.Args, " ")))