Commit Graph

458 Commits

Author SHA1 Message Date
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
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
574dad0b9d Merge pull request #9792 from jfrazelle/9770-parse-exec-usage
Return usage on parseExec error.
Upstream-commit: 819b715b8d7e3ab12be64c289055ae628ba46c08
Component: engine
2014-12-26 17:45:55 -08:00
2a5b064872 Merge pull request #9795 from LK4D4/update_libcontainer
Update libcontainer to 1597c68f7b941fd97881155d7f077852e2914e7b
Upstream-commit: 305c898cd7fa8e7152f3f01cfdc2f5c14b4d35f0
Component: engine
2014-12-23 15:41:26 -08: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
c77458bef6 Update libcontainer to 1597c68f7b941fd97881155d7f077852e2914e7b
This commit contains changes for docker:
* user.GetGroupFile to user.GetGroupPath docker/libcontainer#301
* Add systemd support for OOM docker/libcontainer#307
* Support for custom namespaces docker/libcontainer#279, docker/libcontainer#312
* Fixes #9699 docker/libcontainer#308

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 50905a6d6ce2fdd1ab0c33ec0b7a26895e0cbeea
Component: engine
2014-12-23 12:10:03 -08:00
5de3fe398b api/server: commenting proppy from maintainer
Signed-off-by: Johan Euphrosine <proppy@google.com>
Upstream-commit: 4fd2a9156cafba7d0747d7a049eda12aac86daf8
Component: engine
2014-12-23 11:01:27 -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
0935b51529 Merge pull request #9181 from icecrime/allocate_daemon_ports
Allocate daemon listening ports
Upstream-commit: 21bba5d93a888e20d7fa8d7dd56efbdd1fd486c1
Component: engine
2014-12-17 18:01:20 -08:00
92f0893f9e Set HTTP upgrade header only when requested by client
Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Upstream-commit: c230f7041302351aed6d5c4ac82b98262d9562ef
Component: engine
2014-12-15 21:05:59 +01: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
6d8465a765 Merge pull request #9582 from Mic92/tls_interactive_exec
Fix interactive TLS postContainersAttach
Upstream-commit: b905f88ee55d562cf3b8a780fc03f51eddf391c8
Component: engine
2014-12-10 10:37:50 -08:00
3f619723e5 Fix interactive TLS postContainersAttach
related to 266a1044deb9a085ed43dccdc6

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: a25168d28d552c33988c1a0f3d6a54355c246566
Component: engine
2014-12-10 08:57:38 +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
be5e940362 Merge pull request #9489 from crosbymichael/info-root
Return docker's root dir in docker -D info
Upstream-commit: 12252e39a0abc188e1cd1fe9e921eef967308e1c
Component: engine
2014-12-08 09:05:00 -08:00
7f2911210b Merge pull request #9497 from icecrime/86580-tls_interactive_exec
Fix interactive exec over TLS
Upstream-commit: 53d5299a40ad149be420bb87e5c97c616c1df821
Component: engine
2014-12-06 13:12:06 -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
1c71415b94 Fix interactive exec over TLS
The code no longer assumes a net.TCPConn underlying the HTTP connection
in order to close attached streams.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 266a1044deb9a085ed43dccdc6cfa0723e5142b0
Component: engine
2014-12-03 23:43:03 -08:00
482d9b0df3 Be consistent about libtrust import path.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7c7026bd2255cef47cbb026afe0b984d4c9a9130
Component: engine
2014-12-03 17:36:14 -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
c0a5d7486b Fix client-side HTTP hijacking over TLS
Properly CloseWrite() the client socket once done with stdin when using
TLS connection (this used to rely on an erroneous type assertion).

Fixes #8658.
Fixes #8642.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: Michael Crosby <crosby.michael@gmail.com>
Upstream-commit: e98e56bb1edc3835bc835c9e034780845c64d797
Component: engine
2014-12-01 18:13:52 -08:00
3e14694b93 Merge pull request #9330 from TomasTomecek/master
docs: man docker-images: inconsistent naming
Upstream-commit: b487d2f2ff9562301c1e9a1e705876ff3e3f3c10
Component: engine
2014-12-02 11:42:29 +10:00
70cf9e5532 Merge pull request #9425 from HuKeping/master
inspect: format the output of docker inspect
Upstream-commit: 65e75998afc53eacdac8784434dd1a7baa92be70
Component: engine
2014-12-01 16:51:47 -08:00
cc225fbb9e Attach goroutine blocking profiler
/debug/pprof/block is 404 currently

Signed-off-by: Huayi Zhang <irachex@gmail.com>
Upstream-commit: 51172493ab6d2b31760b9fe273c7d4d0917a9bb7
Component: engine
2014-12-01 16:46:59 +08:00
a5fafedf3b inspect: format the output of docker inspect
Prior to this patch, one would get the output of docker inspect xxx
as below:

user@server:/mnt$ docker inspect ubuntu
[{
    "Architecture": "amd64",

    ...

    "VirtualSize": 199257566
}
]user@server:/mnt$

The last ']' was on the same line with the prompt, i wonder if it is
really what we want it be, it is a little weird, so i add a '\n' to it.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 921346be48d20a66b2b5763144b064395285bb32
Component: engine
2014-12-01 16:28:08 +08:00
f8672e482a docs: man docker-images: inconsistent naming
Synopsis is mentioning "NAME" while description is describing "REPOSITORY".

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Upstream-commit: 095027944f16205c1c75d47d2f60a7c1ac666bf1
Component: engine
2014-11-28 08:57:07 +01:00
3253386751 Merge pull request #9208 from duglin/Issue8703
Add support for docker exec to return cmd exitStatus
Upstream-commit: 00c2a8f323548b7d0aa54cfd10a594dd93ddbed0
Component: engine
2014-11-25 18:03:51 -08:00
039ddfff8b Merge pull request #8893 from vieux/filter_events
Events filtering (daemon side)
Upstream-commit: 9160e01cefbc4a7dd2ad38167c928c959dde3fad
Component: engine
2014-11-25 17:52:27 -08:00
c28ef478d3 Add support for docker exec to return cmd exitStatus
Note - only support the non-detached mode of exec right now.
Another PR will add -d support.

Closes #8703

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 90928eb1140fc0394e2a79d5e9a91dbc0f02484c
Component: engine
2014-11-25 17:49:25 -08:00
3388d83b40 Fix to avoid a compilation error of size_test.go with GCCGO due to float to int truncation
Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
Upstream-commit: 82a5cd0d3701fc559fb92290ed6bc2974a9d8b6d
Component: engine
2014-11-25 18:12:22 +09:00
033a9598e5 Update code for use of urlutil pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5794b5373ef26846b3cc5e48e651208771d12b19
Component: engine
2014-11-24 18:47:42 -05:00
b6f3cebe53 Merge pull request #9281 from unclejack/build_pull_flag
build: add pull flag to force image pulling
Upstream-commit: 5e19ecf25c942ae809ad5b5cf0bb010845395e58
Component: engine
2014-11-24 12:10:45 -08:00
17175863b2 Merge pull request #9188 from somaopensource/8777-fix
Fix for #8777 (continuing PR #9061)
Upstream-commit: d7626e97b61f5f8f5d585ec82d6154395a3f9404
Component: engine
2014-11-21 17:57:56 -08:00
d66b329d87 Merge pull request #9270 from jfrazelle/8919-tag-output
Output image with tag name when image is not found
Upstream-commit: 07b7bdb4fcd97efee02d9eb3c19ada7f54d60c25
Component: engine
2014-11-22 01:56:31 +02:00
19f9fcbc25 build: add pull flag to force image pulling
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 054e57a622e6a065c343806e7334920d17a03c5b
Component: engine
2014-11-21 19:59:44 +02:00