Commit Graph

271 Commits

Author SHA1 Message Date
ebc844c8a7 Fixes #10388
The cmd.Lookup should be "-attach" and not "attach", as seen in
docker/docker/runconfig/parse.go

Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: af90fe6a633be3a5bff4d20b0a59b9189a171176
Component: engine
2015-02-02 12:07:52 +00:00
2b170012a1 Merge pull request #10456 from dmcgowan/revert-client-signature
Revert client signature
Upstream-commit: d8ad7c0edcf9f9a59df7180496abac8b4b5a3942
Component: engine
2015-01-30 14:54:27 -08:00
12b02aa7f6 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 403d981d70dc8a493a9a10be4b5d2e2ce871f380
Component: engine
2015-01-30 14:20:32 -08:00
ea66003c5c Merge pull request #10460 from estesp/10387-setup-tcp-keepalive
Setup TCP keep-alive on hijacked HTTP(S) client <--> daemon sessions
Upstream-commit: 1dc1b9345109549e619f207f4ecbc30605b4ebb6
Component: engine
2015-01-30 11:31:31 -08:00
9430b451d3 Setup TCP keep-alive on hijacked HTTP(S) client <--> daemon sessions
Fixes #10387

Without TCP keep-alive set on socket connections to the daemon, any
long-running container with std{out,err,in} attached that doesn't
read/write for a minute or longer will end in ECONNTIMEDOUT (depending
on network settings/OS defaults, etc.), leaving the docker client side
believing it is still waiting on data with no actual underlying socket
connection.

This patch turns on TCP keep-alive for the underlying TCP connection
for both TLS and standard HTTP hijacked daemon connections from the
docker client, with a keep-alive timeout of 30 seconds.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: f73a6b3845a498107cfb22e4d962f0a30870e7c6
Component: engine
2015-01-30 10:50:27 -05:00
eb1117987a Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0eed1f4d8da893d7c91be811197032a064053155
Component: engine
2015-01-29 13:46:12 -08:00
7304bd6808 Zero out stats values in the cli
Based on some feedback, when you have a container via the cli that you
are monitoring for stats, if you stop the container it will stay in the
display but report the last datapoint that was received.

This PR changes the display to zero out the values for containers where
an update has not been received within a specified duration, i.e. 2
seconds.  This signals the user that the container has stopped as it
reports cpu and memory usage of 0.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: bbc38497b6f522b0a9c4e5e976abfd79692b8b5f
Component: engine
2015-01-21 15:33:53 -08:00
f0170e8737 Update to docker stats documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: db9b1e3654464b0e7008fbad15d43fbbba87b1a4
Component: engine
2015-01-21 11:44:23 -08:00
6bc1b160e8 Exit cli when all containers when no more containers to monitor
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4b173199fde99a2b275421ed070b0ec004730e35
Component: engine
2015-01-21 08:55:23 -08:00
a77fb96f4c Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 76141a00779880368b15ef2a5ffd28a80e4637df
Component: engine
2015-01-20 20:21:47 -08:00
debfc19162 Refactor usage calc for CPU and system usage
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2d4fc1de0560c8052b4480035bb364fb28525b39
Component: engine
2015-01-20 20:21:46 -08:00
5cb454e8c2 Refactor cli for stats
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: cc658804c000b8f652750ccf3233a73cc6f03073
Component: engine
2015-01-20 20:21:46 -08:00
2dcbad59cf Evict stopped containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4f174aa79276c12a1b2b98df2f02d6bee36b7a93
Component: engine
2015-01-20 20:21:46 -08:00
03d1b8dbe7 Implement client side display for stats
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 2640a10bca29c4a4199c906a26f658aac8a68dc2
Component: engine
2015-01-20 20:21:46 -08:00
76f28ab081 Merge pull request #10128 from vieux/filters_image
Server-side restriction of allowed image filters
Upstream-commit: cb9db04fd72cf31b3df802fe19a0cff4cf682438
Component: engine
2015-01-19 13:24:03 -08:00
b098aaedce Merge pull request #9784 from dmcgowan/v2-registry
Client Support for Docker Registry HTTP API V2
Upstream-commit: 8b95ad230e2ee76450ceb9a80aa8e942a56bb397
Component: engine
2015-01-19 10:46:38 -08:00
3968c04241 Fix typo in deprecation message.
Because the doc maintainers don't like Cockney.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bf14bacac3f1cae15ce7b32b5341122c305e630e
Component: engine
2015-01-16 23:36:50 +01:00
445d9d9198 don't restrict filters in docker images
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0e9acf76844a0dcd76bc855b945d0e4b80149195
Component: engine
2015-01-16 01:09:01 +00:00
6a46693a7d Push flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 188b56c836e49e3c888e1e27e4e26b5cc0f1caaa
Component: engine
2015-01-15 14:05:05 -08:00
792af8c0a5 Add build --pull and evenets --filter flags to the docs for 1.4
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 18a2c77435cdad8f759421500cba6ac20057daf8
Component: engine
2015-01-15 15:20:48 +13:00
663cdb3f16 Merge pull request #9951 from andersjanmyr/add-proxy-from-environment-to-client
Add ProxyFromEnvironment enables client via proxy.
Upstream-commit: ab86f591c323b38c918a026f38a26df120a475ac
Component: engine
2015-01-13 10:53:00 -08:00
080d79ba9a Merge pull request #8570 from brahmaroutu/rename_container_3036
Rename a existing container
Upstream-commit: b9e42d66e790535fe1226adea4ff39e25f493b51
Component: engine
2015-01-13 10:37:29 -08:00
287a9987a0 Fix docker run/exec/create not printing error messages
If an error message happens while parsing docker run or docker exec, the message
is not being printed out.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 12a7e78b125afd277adb7cd099817a419f4faaa0
Component: engine
2015-01-13 09:23:13 -05:00
eacdfc7d44 rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 21a809d9ae0ef8392f37c9262dca93ff31966e22
Component: engine
2015-01-13 03:27:17 +00:00
9665ff2e03 Fix range for go 1.3
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: cd5902fc7bb0da36fedb6ff6a1bb8ef200b212d9
Component: engine
2015-01-12 11:49:52 -08:00
677c67311a Use the official mime type that exists instead of an imaginary one that does not.
Signed-off-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@linux.com> (github: jfrazelle)
Upstream-commit: f29ee870512e8809bfc396c1771fd74235c9de7b
Component: engine
2015-01-09 20:24:54 -08:00
2ef483a8f2 Fix silly little syntax mistake
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 6292354dc359a6d8f47b3199284147d557d2c697
Component: engine
2015-01-09 15:03:11 -07:00
a1663344f6 Add "gofmt" from Go 1.3.3
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: b20363c4c056bebe256f0d53283ca1e537ed5cf6
Component: engine
2015-01-09 09:54:58 -07:00
a6dde9956d Adding workaround to suppress gofmt issues with api/client/utils.go
Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 33b931e718b89fec64705471534f8df3d5e42c4c
Component: engine
2015-01-08 21:16:43 +00:00
5aa04a56fb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 568f86eb186731b907b659e4ec64bda21c2fe31d
Component: engine
2015-01-08 20:14:58 +00:00
d7d0e51f38 Add ProxyFromEnvironment enables client via proxy.
Signed-off-by: Anders Janmyr <anders@janmyr.com>
Upstream-commit: 43d45e601fa13bc43228ae3b76b1b5c5737b0558
Component: engine
2015-01-08 08:12:31 +01:00
1ccf95f569 Merge pull request #9936 from icecrime/noecho_start_attached
Fix cli echoing container ID on start -a|-i
Upstream-commit: 91509bfb669dca00dc1fd7ef680fc762a5deff61
Component: engine
2015-01-06 19:07:40 -08:00
fee739749d Fix cli echoing container ID on start -a|-i
The cli now doesn't echo the container ID when started using either -a
or -i. Also fixes `TestStartAttachCorrectExitCode` which incorrectly
called start with the result of wait rather than the container ID.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: eeefa2dc8c45a9be4cfb3a52029e6b46570e5ebe
Component: engine
2015-01-06 17:58:30 -08:00
269ee3bcdf Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: eb3ea3b43c716ad727521a7d0bc20d7321bb0867
Component: engine
2015-01-06 16:33:26 -08:00
b060268a74 Merge pull request #8748 from duglin/Issue8330
Have .dockerignore support Dockerfile/.dockerignore
Upstream-commit: 6d780139c4b7960b482a5f4fbf043adb6673864b
Component: engine
2015-01-06 13:47:42 -08:00
1a4a1b2193 Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6d801a3caa54ad7ef574bc426aa1ffc412c5af82
Component: engine
2015-01-06 10:57:48 -08:00
fa232dc1ae Exit with non-zero code on first argument parsing error
Ignoring return value of ParseFlags leads to exit code 0 if bad
arguments are supplied. This patch makes sure that subcommands exit
with non-zero code in such a case.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 8a785792cd3c3fb4494bced475263aef5fa4534b
Component: engine
2015-01-06 13:46:38 +01:00
7a4065fe5d Fixed error reporting
Removed redundant print line and fixed handling of command-less docker
invocation.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 08f0f1ee1db2dea79e622764891cb8b1432bcab1
Component: engine
2015-01-06 13:44:27 +01:00
319270793a Handle bad options better
* Do not log bad options error message twice, e.g.:

    $ docker run --pouet
    flag provided but not defined: --pouet
    See 'docker run --help'.
    2014/11/05 21:41:23 flag provided but not defined: --pouet

  With this patch just the first two lines will be produced.

* Print 'docker' just once when run without a command, e.g.:

    $ docker --hel
    flag provided but not defined: --hel
    See 'docker docker --help'.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 1d09fc22ca14b0b83bdc81cba06d3d7ac886a3e6
Component: engine
2015-01-06 13:44:27 +01:00
639170852f refactor redundant code around calls to cmd.Parse
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 41be2f73c7ce2cbb5450ee8bb35bf7235125ca63
Component: engine
2015-01-06 13:41:16 +01:00
f82eddabc6 --help option and help command should print to stdout not stderr
--help and help are successful commands so output should not go to error.

    QE teams have requested this change, also users doing docker help | less
    or docker run --help | less would expect this to work.

    Usage statement should only be printed when the user asks for it.
    Errors should print error message and then suggest the docker COMMAND --help
    command to see usage information.

    The current behaviour causes the user to have to search for the error message
    and sometimes scrolls right off the screen.  For example a error on a
    "docker run" command is very difficult to diagnose.

    Finally erros should always exit with a non 0 exit code, if the user
    makes a CLI error.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: a2b529ead21e6ab9eafcb1b1d2437c725c43a06a
Component: engine
2015-01-06 13:40:14 +01:00
301d5a4920 Return usage on parseExec error.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7fdbd90f8805736aa78156faf7e6f8fdd2384af7
Component: engine
2014-12-23 12:49:45 -08:00
c7d1f45ca3 Merge pull request #9233 from inatatsu/fix-pkg-units-size-for-gccgo
Fix to avoid a compile error due to float to int truncation with GCCGO
Upstream-commit: 2acb856dff848bd69c5e971f6352854a26362164
Component: engine
2014-12-18 18:33:01 -08:00
98bb6eba72 Make FROM scratch a special cased 'no-base' spec
There has been a lot of discussion (issues 4242 and 5262) about making
`FROM scratch` either a special case or making `FROM` optional, implying
starting from an empty file system.

This patch makes the build command `FROM scratch` special cased from now on
and if used does not pull/set the the initial layer of the build to the ancient
image ID (511136ea..) but instead marks the build as having no base image. The
next command in the dockerfile will create an image with a parent image ID of "".
This means every image ever can now use one fewer layer!

This also makes the image name `scratch` a reserved name by the TagStore. You
will not be able to tag an image with this name from now on. If any users
currently have an image tagged as `scratch`, they will still be able to use that
image, but will not be able to tag a new image with that name.

Goodbye '511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158',
it was nice knowing you.

Fixes #4242

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 8936789919c5c8004f346f44a3452d1521818b60
Component: engine
2014-12-18 14:03:38 -08:00
15b350dcf5 Set HTTP upgrade headers when hijacking connection
Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Upstream-commit: 9256578f62ffe885befa3ef2dbdd9ec0bea1d7e8
Component: engine
2014-12-13 14:24:51 +01:00
1d39a69298 Forbid client piping to tty enabled container
Forbid `docker run -t` with a redirected stdin (such as `echo test |
docker run -ti busybox cat`). Forbid `docker exec -t` with a redirected
stdin. Forbid `docker attach` with a redirect stdin toward a tty enabled
container.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 67e3ddb75ff27b8de0022e330413b4308ec5b010
Component: engine
2014-12-09 14:30:49 -08:00
1c6f987783 Merge pull request #9512 from duglin/Issue9404
Make 'docker build' send non-err output to stdout
Upstream-commit: 58ce0146e16e2e63b7a94d34a48722a9c7400c18
Component: engine
2014-12-08 11:08:13 -08:00
0703a67ce9 Return docker's root dir in docker -D info
This adds the docker daemon's root directory to docker info when running
in debug mode.  This allows the user to view the root directory where
docker is writing and storing state.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 654da4e151c449725b6996d47b7ff33767e87da9
Component: engine
2014-12-05 12:13:25 -08:00
52bfe6086a Make 'docker build' send non-err output to stdout
Right now 'docker build' will send:
   Sending build context to Docker daemon
to stderr, instead of stdout.  This PR fixes that.

I looked in the rest of api/client/commands.go for other cases
that might do this and only one jumped out at me:
  https://github.com/docker/docker/blob/master/api/client/commands.go#L2202
but I think if I changed that to go to stdout then it'll mess people up
who are expecting just the container ID to be printed to the screen and
there is no --quiet type of flag we can check.

Closes #9404

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5c91bb93a7e35b2d443090cabc7ec0a2ca59b6ee
Component: engine
2014-12-04 14:06:40 -08:00
958b540000 Merge pull request #9442 from icecrime/8658-tls_attach_hangs
Fix client-side HTTP hijacking over TLS
Upstream-commit: 5ec3a038a05116e3b3983d3271ada74408fee0e3
Component: engine
2014-12-02 09:47:29 -08:00