Przeglądaj źródła

fix attach and remove cli doc

Victor Vieux 12 lat temu
rodzic
commit
4576e11121
31 zmienionych plików z 2 dodań i 347 usunięć
  1. 1 2
      commands.go
  2. 0 55
      docs/sources/commandline/cli.rst
  3. 0 9
      docs/sources/commandline/command/attach.rst
  4. 0 9
      docs/sources/commandline/command/build.rst
  5. 0 27
      docs/sources/commandline/command/commit.rst
  6. 0 9
      docs/sources/commandline/command/diff.rst
  7. 0 9
      docs/sources/commandline/command/export.rst
  8. 0 9
      docs/sources/commandline/command/history.rst
  9. 0 22
      docs/sources/commandline/command/images.rst
  10. BIN
      docs/sources/commandline/command/images/docker_images.gif
  11. 0 9
      docs/sources/commandline/command/import.rst
  12. 0 9
      docs/sources/commandline/command/info.rst
  13. 0 9
      docs/sources/commandline/command/inspect.rst
  14. 0 9
      docs/sources/commandline/command/kill.rst
  15. 0 9
      docs/sources/commandline/command/login.rst
  16. 0 9
      docs/sources/commandline/command/logs.rst
  17. 0 9
      docs/sources/commandline/command/port.rst
  18. 0 13
      docs/sources/commandline/command/ps.rst
  19. 0 9
      docs/sources/commandline/command/pull.rst
  20. 0 9
      docs/sources/commandline/command/push.rst
  21. 0 9
      docs/sources/commandline/command/restart.rst
  22. 0 9
      docs/sources/commandline/command/rm.rst
  23. 0 9
      docs/sources/commandline/command/rmi.rst
  24. 0 22
      docs/sources/commandline/command/run.rst
  25. 0 10
      docs/sources/commandline/command/search.rst
  26. 0 9
      docs/sources/commandline/command/start.rst
  27. 0 9
      docs/sources/commandline/command/stop.rst
  28. 0 11
      docs/sources/commandline/command/tag.rst
  29. 0 3
      docs/sources/commandline/command/version.rst
  30. 0 9
      docs/sources/commandline/command/wait.rst
  31. 1 2
      docs/sources/commandline/index.rst

+ 1 - 2
commands.go

@@ -949,7 +949,7 @@ func CmdAttach(args ...string) error {
 		return nil
 		return nil
 	}
 	}
 
 
-	body, _, err := call("GET", "/containers/"+cmd.Arg(0), nil)
+	body, _, err := call("GET", "/containers/"+cmd.Arg(0)+"/json", nil)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
@@ -961,7 +961,6 @@ func CmdAttach(args ...string) error {
 	}
 	}
 
 
 	v := url.Values{}
 	v := url.Values{}
-	v.Set("logs", "1")
 	v.Set("stream", "1")
 	v.Set("stream", "1")
 	v.Set("stdout", "1")
 	v.Set("stdout", "1")
 	v.Set("stderr", "1")
 	v.Set("stderr", "1")

+ 0 - 55
docs/sources/commandline/cli.rst

@@ -1,55 +0,0 @@
-:title: Command Line Interface
-:description: Docker's CLI command description and usage
-:keywords: Docker, Docker documentation, CLI, command line
-
-.. _cli:
-
-Command Line Interface
-======================
-
-Docker Usage
-~~~~~~~~~~~~
-
-To list available commands, either run ``docker`` with no parameters or execute
-``docker help``::
-
-  $ docker
-    Usage: docker COMMAND [arg...]
-
-    A self-sufficient runtime for linux containers.
-
-    ...
-
-Available Commands
-~~~~~~~~~~~~~~~~~~
-
-.. toctree::
-   :maxdepth: 1
-
-   command/attach
-   command/build
-   command/commit
-   command/diff
-   command/export
-   command/history
-   command/images
-   command/import
-   command/info
-   command/inspect
-   command/kill
-   command/login
-   command/logs
-   command/port
-   command/ps
-   command/pull
-   command/push
-   command/restart
-   command/rm
-   command/rmi
-   command/run
-   command/search
-   command/start
-   command/stop
-   command/tag
-   command/version
-   command/wait

+ 0 - 9
docs/sources/commandline/command/attach.rst

@@ -1,9 +0,0 @@
-===========================================
-``attach`` -- Attach to a running container
-===========================================
-
-::
-
-    Usage: docker attach CONTAINER
-
-    Attach to a running container

+ 0 - 9
docs/sources/commandline/command/build.rst

@@ -1,9 +0,0 @@
-===========================================
-``build`` -- Build a container from Dockerfile via stdin
-===========================================
-
-::
-
-    Usage: docker build -
-    Example: cat Dockerfile | docker build -
-    Build a new image from the Dockerfile passed via stdin

+ 0 - 27
docs/sources/commandline/command/commit.rst

@@ -1,27 +0,0 @@
-===========================================================
-``commit`` -- Create a new image from a container's changes
-===========================================================
-
-::
-
-    Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY [TAG]]
-
-    Create a new image from a container's changes
-
-      -m="": Commit message
-      -author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
-      -run="": Config automatically applied when the image is run. "+`(ex: {"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
-
-Full -run example::
-
-    {"Hostname": "",
-     "User": "",
-     "Memory": 0,
-     "MemorySwap": 0,
-     "PortSpecs": ["22", "80", "443"],
-     "Tty": true,
-     "OpenStdin": true,
-     "StdinOnce": true,
-     "Env": ["FOO=BAR", "FOO2=BAR2"],
-     "Cmd": ["cat", "-e", "/etc/resolv.conf"],
-     "Dns": ["8.8.8.8", "8.8.4.4"]}

+ 0 - 9
docs/sources/commandline/command/diff.rst

@@ -1,9 +0,0 @@
-=======================================================
-``diff`` -- Inspect changes on a container's filesystem
-=======================================================
-
-::
-
-    Usage: docker diff CONTAINER [OPTIONS]
-
-    Inspect changes on a container's filesystem

+ 0 - 9
docs/sources/commandline/command/export.rst

@@ -1,9 +0,0 @@
-=================================================================
-``export`` -- Stream the contents of a container as a tar archive
-=================================================================
-
-::
-
-    Usage: docker export CONTAINER
-
-    Export the contents of a filesystem as a tar archive

+ 0 - 9
docs/sources/commandline/command/history.rst

@@ -1,9 +0,0 @@
-===========================================
-``history`` -- Show the history of an image
-===========================================
-
-::
-
-    Usage: docker history [OPTIONS] IMAGE
-
-    Show the history of an image

+ 0 - 22
docs/sources/commandline/command/images.rst

@@ -1,22 +0,0 @@
-=========================
-``images`` -- List images
-=========================
-
-::
-
-    Usage: docker images [OPTIONS] [NAME]
-
-    List images
-
-      -a=false: show all images
-      -q=false: only show numeric IDs
-      -viz=false: output in graphviz format
-
-Displaying images visually
---------------------------
-
-::
-
-    docker images -viz | dot -Tpng -o docker.png
-
-.. image:: images/docker_images.gif

BIN
docs/sources/commandline/command/images/docker_images.gif


+ 0 - 9
docs/sources/commandline/command/import.rst

@@ -1,9 +0,0 @@
-==========================================================================
-``import`` -- Create a new filesystem image from the contents of a tarball
-==========================================================================
-
-::
-
-    Usage: docker import [OPTIONS] URL|- [REPOSITORY [TAG]]
-
-    Create a new filesystem image from the contents of a tarball

+ 0 - 9
docs/sources/commandline/command/info.rst

@@ -1,9 +0,0 @@
-===========================================
-``info`` -- Display system-wide information
-===========================================
-
-::
-
-    Usage: docker info
-
-    Display system-wide information.

+ 0 - 9
docs/sources/commandline/command/inspect.rst

@@ -1,9 +0,0 @@
-==========================================================
-``inspect`` -- Return low-level information on a container
-==========================================================
-
-::
-
-    Usage: docker inspect [OPTIONS] CONTAINER
-
-    Return low-level information on a container

+ 0 - 9
docs/sources/commandline/command/kill.rst

@@ -1,9 +0,0 @@
-====================================
-``kill`` -- Kill a running container
-====================================
-
-::
-
-    Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
-
-    Kill a running container

+ 0 - 9
docs/sources/commandline/command/login.rst

@@ -1,9 +0,0 @@
-============================================================
-``login`` -- Register or Login to the docker registry server
-============================================================
-
-::
-
-    Usage: docker login
-
-    Register or Login to the docker registry server

+ 0 - 9
docs/sources/commandline/command/logs.rst

@@ -1,9 +0,0 @@
-=========================================
-``logs`` -- Fetch the logs of a container
-=========================================
-
-::
-
-    Usage: docker logs [OPTIONS] CONTAINER
-
-    Fetch the logs of a container

+ 0 - 9
docs/sources/commandline/command/port.rst

@@ -1,9 +0,0 @@
-=========================================================================
-``port`` -- Lookup the public-facing port which is NAT-ed to PRIVATE_PORT
-=========================================================================
-
-::
-
-    Usage: docker port [OPTIONS] CONTAINER PRIVATE_PORT
-
-    Lookup the public-facing port which is NAT-ed to PRIVATE_PORT

+ 0 - 13
docs/sources/commandline/command/ps.rst

@@ -1,13 +0,0 @@
-=========================
-``ps`` -- List containers
-=========================
-
-::
-
-    Usage: docker ps [OPTIONS]
-
-    List containers
-
-      -a=false: Show all containers. Only running containers are shown by default.
-      -notrunc=false: Don't truncate output
-      -q=false: Only display numeric IDs

+ 0 - 9
docs/sources/commandline/command/pull.rst

@@ -1,9 +0,0 @@
-=========================================================================
-``pull`` -- Pull an image or a repository from the docker registry server
-=========================================================================
-
-::
-
-    Usage: docker pull NAME
-
-    Pull an image or a repository from the registry

+ 0 - 9
docs/sources/commandline/command/push.rst

@@ -1,9 +0,0 @@
-=======================================================================
-``push`` -- Push an image or a repository to the docker registry server
-=======================================================================
-
-::
-
-    Usage: docker push NAME
-
-    Push an image or a repository to the registry

+ 0 - 9
docs/sources/commandline/command/restart.rst

@@ -1,9 +0,0 @@
-==========================================
-``restart`` -- Restart a running container
-==========================================
-
-::
-
-    Usage: docker restart [OPTIONS] NAME
-
-    Restart a running container

+ 0 - 9
docs/sources/commandline/command/rm.rst

@@ -1,9 +0,0 @@
-============================
-``rm`` -- Remove a container
-============================
-
-::
-
-    Usage: docker rm [OPTIONS] CONTAINER
-
-    Remove a container

+ 0 - 9
docs/sources/commandline/command/rmi.rst

@@ -1,9 +0,0 @@
-==========================
-``rmi`` -- Remove an image
-==========================
-
-::
-
-    Usage: docker rmimage [OPTIONS] IMAGE
-
-    Remove an image

+ 0 - 22
docs/sources/commandline/command/run.rst

@@ -1,22 +0,0 @@
-===========================================
-``run`` -- Run a command in a new container
-===========================================
-
-::
-
-    Usage: docker run [OPTIONS] IMAGE COMMAND [ARG...]
-
-    Run a command in a new container
-
-      -a=map[]: Attach to stdin, stdout or stderr.
-      -d=false: Detached mode: leave the container running in the background
-      -e=[]: Set environment variables
-      -h="": Container host name
-      -i=false: Keep stdin open even if not attached
-      -m=0: Memory limit (in bytes)
-      -p=[]: Map a network port to the container
-      -t=false: Allocate a pseudo-tty
-      -u="": Username or UID
-      -d=[]: Set custom dns servers for the container
-      -v=[]: Creates a new volumes and mount it at the specified path.
-      -volumes-from="": Mount all volumes from the given container.

+ 0 - 10
docs/sources/commandline/command/search.rst

@@ -1,10 +0,0 @@
-===================================================================
-``search`` -- Search for an image in the docker index
-===================================================================
-
-::
-
-    Usage: docker search TERM
-
-    Searches for the TERM parameter on the Docker index and prints out a list of repositories
-    that match.

+ 0 - 9
docs/sources/commandline/command/start.rst

@@ -1,9 +0,0 @@
-======================================
-``start`` -- Start a stopped container
-======================================
-
-::
-
-    Usage: docker start [OPTIONS] NAME
-
-    Start a stopped container

+ 0 - 9
docs/sources/commandline/command/stop.rst

@@ -1,9 +0,0 @@
-====================================
-``stop`` -- Stop a running container
-====================================
-
-::
-
-    Usage: docker stop [OPTIONS] NAME
-
-    Stop a running container

+ 0 - 11
docs/sources/commandline/command/tag.rst

@@ -1,11 +0,0 @@
-=========================================
-``tag`` -- Tag an image into a repository
-=========================================
-
-::
-
-    Usage: docker tag [OPTIONS] IMAGE REPOSITORY [TAG]
-
-    Tag an image into a repository
-
-      -f=false: Force

+ 0 - 3
docs/sources/commandline/command/version.rst

@@ -1,3 +0,0 @@
-==================================================
-``version`` -- Show the docker version information
-==================================================

+ 0 - 9
docs/sources/commandline/command/wait.rst

@@ -1,9 +0,0 @@
-===================================================================
-``wait`` -- Block until a container stops, then print its exit code
-===================================================================
-
-::
-
-    Usage: docker wait [OPTIONS] NAME
-
-    Block until a container stops, then print its exit code.

+ 1 - 2
docs/sources/commandline/index.rst

@@ -9,8 +9,7 @@ Commands
 Contents:
 Contents:
 
 
 .. toctree::
 .. toctree::
-  :maxdepth: 3
+  :maxdepth: 2
 
 
   basics
   basics
   workingwithrepository
   workingwithrepository
-  cli