Commit Graph

330 Commits

Author SHA1 Message Date
afe8e130e0 Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific
packages, only those in pkg and vendor, it can be safely moved into pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
Upstream-commit: 30d5a42c1f24e26f681b7330249f04fec891aee9
Component: engine
2014-09-29 23:23:36 -07:00
3ffb3fc6cc Move Go() promise-like func from utils to pkg/promise
This is the first of two steps to break the archive package's dependence
on utils so that archive may be moved into pkg.  Also, the `Go()`
function is small, concise, and not specific to the docker internals, so
it is a good candidate for pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
Upstream-commit: b845a62149d5f4990462ac6c9167c5cfaa0e66cb
Component: engine
2014-09-29 23:16:27 -07:00
baaf0d57f5 Merge pull request #8112 from dmcgowan/libtrust_key_management
Libtrust key management
Upstream-commit: 999d4117f6544aeefaba3c40aef678042c71aa7a
Component: engine
2014-09-29 16:32:48 -07:00
42a0d5d817 Merge pull request #8276 from dqminh/8262-validate-build-tag
Fix #8262: check tag's validity before building.
Upstream-commit: 22bd54be4a3ab1976336035e7196b9c3fe6f251b
Component: engine
2014-09-29 10:57:54 -07:00
f1fc2d14e1 api/server/MAINTAINERS: back from vacation
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
Upstream-commit: 8019eec68169d35fd4eff78fcceed0f151abfcd7
Component: engine
2014-09-29 10:03:07 -07:00
ad9bd3a850 check tag's validity before building.
When user passes an invalid tag to `docker build`
(i.e.  `docker build -t abcd:A0123456789B0123456789C0123456789 .`), check the
tag first and terminate-early so user can specify the tag again

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 8833d800bf622dcb6a66da0fe4c7a61a1620b62c
Component: engine
2014-09-29 06:21:54 -04:00
b5b7b0a681 Add libtrust key identity management
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ea6a480128316be5494284dbb688b58bd65e6f63
Component: engine
2014-09-26 15:52:08 -07:00
acaefc427a Merge pull request #8233 from tiborvass/pr-7658
Fix Interactive container hangs when redirecting stdout
Upstream-commit: 0bb5f987315a51ef39f5fb070bff03c2849d059d
Component: engine
2014-09-26 11:31:29 -07:00
07bda71556 Merge pull request #8224 from cpuguy83/7843_fix_start_attach_error_hang
Fix #7843 start -a can cause frozen term
Upstream-commit: 07da2e03b14c91f464f9fdfdbe8848ae8fc3725e
Component: engine
2014-09-26 11:54:39 -04:00
a47e9ab2de Fix #7843
When doing `docker start -a` on a container that won't start, terminal
was getting stuck on the attach, even after container removal.

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 9ae9d7db574083ce6233b33e8b0bbefb219d7fe6
Component: engine
2014-09-26 11:31:02 -04:00
8b12ac14d7 API: Provide the HostConfig during "run".
Currently, the HostConfig is only passed from the CLI to Docker only
when issuing a docker create, but not when doing a docker run.

In the near future, in order to allocate ports at creation time rather
than start time, we will need to have the HostConfig readily available
at container creation.

This PR makes the client always pass the HostConfig when creating a
container (regardless of whether it's for a run or create).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 1df87b95066198c30312147393c18e0be0564fd0
Component: engine
2014-09-25 15:24:38 -07:00
e3880837c4 DockerCli: Check IsTerminal() for both STDIN and STDOUT
`docker events > /tmp/out` should not print control
characters to non-terminal STDOUT.

This addresses commit 26b4a4920adca614f6be17a96f254f331271faf0
without creating regression described in issue #6509.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Upstream-commit: d742c57f534352b6cad596d0c9fe8cf84044e92a
Component: engine
2014-09-25 20:58:24 +02:00
5dfb514311 Fix #6509: Interactive container hangs when redirecting stdout
Cli IsTerminal() SYS_IOCTL operation should be determined from STDIN,
not from STDOUT.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Upstream-commit: 40c7b53791b598364ffe2290c88875e4fc65be11
Component: engine
2014-09-25 20:14:25 +02:00
f5181e9a50 Add checks for app/json - issue #2515
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: e2b8d4bd4a77426b555bb1e6f57fc27f04f6c84b
Component: engine
2014-09-25 08:54:48 -07:00
55f5c84e4a Merge pull request #8101 from jfrazelle/6974-correct-ct-json-stream
Change content-type for json stream to application/x-json-stream.
Upstream-commit: 42ec80bec02b7cb921397fc79ca58a18190e2c4b
Component: engine
2014-09-23 11:24:31 -07:00
ce6723b5c8 Merge pull request #8170 from duglin/Issue7547
Allow user to change email/passwd via login - Issue 7547
Upstream-commit: e3f1f0d354020dabee37d7ca31c41938339ad540
Component: engine
2014-09-23 13:57:56 -04:00
22e9827649 Allow user to change email/passwd via login
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: e315493b0c49978a43dacf7c436839d64a401640
Component: engine
2014-09-22 11:58:09 -07:00
dd63155260 Merge pull request #7942 from estesp/7747-stderr-stdout-bug
Fix gh#7747: filter bare newline output and log client pull to stdout
Upstream-commit: 28e308c25ed431da14bf010df8a9beca05b32018
Component: engine
2014-09-22 10:53:34 -07:00
7b47b2e708 Change content-type for json stream to application/x-json-stream.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 10ab2089ce189d5bea3f7aaac3b5081471309478
Component: engine
2014-09-22 10:29:56 -07:00
93e967ece5 Add support for multiple level CLI commands
E.g. "docker groups create" will attempt to call the function
CmdGroupsCreate

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: e1b968f1981f21470a67ed617c36f1c6802bd0a7
Component: engine
2014-09-19 10:43:50 -07:00
b339cb93d3 'an file' -> 'a file' grammar fix
Signed-off-by: Albert Callarisa Roca <albert@acroca.com>
Upstream-commit: 4e11902d05816ba76e15f4af91dd4c507946072e
Component: engine
2014-09-19 08:12:33 +08:00
a701f25898 Merge pull request #8041 from unclejack/lower_allocations_broadcastwriter
lower the number of allocations in broadcastwriter
Upstream-commit: 77d30e71122c7ec328f79836dcab4409f72e04b9
Component: engine
2014-09-17 15:26:44 -07:00
18373aa635 Removed runconfig.ParseSubcommand
Removed runconfig.ParseSubcommand, changed it to runconfig.Parse and editted related tests and modules

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Upstream-commit: 9aa71549d61875fcf0713a9da11b034e70e1c3b0
Component: engine
2014-09-17 14:38:22 -07:00
ba4bc005be move stdcopy to pkg/stdcopy
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 1f03e60c2a96a92acae0e4d2fd604ab2c6d55473
Component: engine
2014-09-17 18:06:17 +03:00
cb5f7b942d add the timeutils package
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 9ae3134dc9f0652ef48ec1fd445f42d8fe26de35
Component: engine
2014-09-17 14:30:08 +03:00
58d6278266 Resolve conflicts with restart policies
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: e49c70109228d657790190007c8f9d7c55a25be2
Component: engine
2014-09-16 18:40:25 -04:00
b187bcdd06 integration-cli: Add docker create tests
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: b0cb37fd3bd65b27a63954b36507a9782088cfc4
Component: engine
2014-09-16 18:40:24 -04:00
764b128304 Add "docker create" support
This exposes the already existing "create container" operation.  It is
very similar to "docker run -d" except it doesn't actually start the
container, but just prepares it. It can then be manually started using
"docker start" at any point.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)

Conflicts:
	api/client/commands.go
	runconfig/parse.go
	server/container.go

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 3a90004f3c2d86ec849f4674c8046693ea061ed1
Component: engine
2014-09-16 18:40:24 -04:00
9c843f0293 Merge pull request #8035 from duglin/Issue7965
Add timeout to client - fix for #7965
Upstream-commit: eb21197c6b4981db3cc2ad95694f92d723d34e2f
Component: engine
2014-09-17 01:55:48 +04:00
bcad074599 Merge pull request #7976 from duglin/Issue7902
Fix for issue 7902 - add trailing zeros to timestamps so logs align
Upstream-commit: 51b26853ef2f124ea837364c02585cbf96999d6a
Component: engine
2014-09-16 13:55:03 -07:00
d25c9ab27a Merge pull request #8062 from vishh/run_in_phase2
Add support for 'docker exec' - phase 2
Upstream-commit: 00fd008170e463426001ec4c56fc4c39450fd8d0
Component: engine
2014-09-16 23:56:12 +04:00
8b57e6f159 Adding docker exec support in CLI.
Fixed a bug in daemon that resulted in accessing of a closed pipe.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: c786a8ee5e9db8f5f609cf8721bd1e1513fb0043
Component: engine
2014-09-16 19:24:25 +00:00
a36831cc2a Fix for issue 7902.
Use utils.RFC3339NanoFixed ("2006-01-02T15:04:05.000000000Z07:00")
instead of time.RFC3339Nano to format our log timestamps - this way
things are aligned, in particular the nano seconds are padded with zeros

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: cd7a5f5c0998f288f71d307076e661ed54f1a5f1
Component: engine
2014-09-16 10:28:37 -07:00
fa164d03f1 Add a timeout when trying to connect to the server, otherwise sometimes it just hangs
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f013aa7f96d7fc818f06f5b7fe0bbd20ff2d3294
Component: engine
2014-09-15 17:30:38 -07:00
ca62c3b92b Splitting the exec remote API into two separate APIs inorder to support resizing of tty sessions.
1. /container/<name>/exec - Creates a new exec command instance in the daemon and container '<name>'. Returns an unique ID for each exec command.
2. /exec/<name>/start - Starts an existing exec command instance. Removes the exec command from the daemon once it completes.

Adding /exec/<name>/resize to resize tty session of an exec command.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: bfebdfde78753f85d53d62634654de0b80f6872d
Component: engine
2014-09-15 22:56:47 +00:00
084a5b1c3f Change the copy command Content-Type header to x-tar
Addresses #6107

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 788e4acaa3883bc7369f9462f107266b41c59746
Component: engine
2014-09-15 10:45:06 -07:00
f0e80c1ea0 Removing 'exec' feature from the CLI until the docker daemon supports resizing of
tty sessions for exec'ed commands.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 0029180f7feb59fd0e4fede0bb839e2aa4968811
Component: engine
2014-09-15 17:06:07 +00:00
40a1e3c634 Address review comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 669561c2aa8966f9327eca4304a06168bcf5bc49
Component: engine
2014-09-15 17:00:00 +00:00
a9173e0a9b Adding 'exec' command to remote API and CLI.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 985d57958675ee11e23070e009605c8968d547cf
Component: engine
2014-09-15 16:59:03 +00:00
666bfb2887 Merge pull request #7957 from bfirsh/consistent-help-messages
Consistent help messages
Upstream-commit: d9c7c1a7dadf1835587f993b7fe2029bb07f1ce0
Component: engine
2014-09-11 15:25:28 -07:00
2326e18ef0 Print consistent help with options and commands
These commands now all output the same thing:

 - docker
 - docker help
 - docker --help
 - docker -h

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: f3ed7b601fa6151868416254e79a18751c5ff024
Component: engine
2014-09-08 16:08:50 -07:00
ca58c61a83 Merge pull request #7759 from unclejack/pull_latest_by_default
make docker pull only the latest tag by default
Upstream-commit: 85314e7e58a17cf3ebc4b29511b3399cd758b1ae
Component: engine
2014-09-08 13:43:21 -07:00
0db8f36c75 Fix line delimited JSON response
For GET /events, line delimit JSON.
Fixes #7047

Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: )
Upstream-commit: d2f75a3040e72562ffa825d5c3efa7004af2640a
Component: engine
2014-09-08 09:41:26 -07:00
53de305780 Fix gh#7747 - filter bare newline output and log client pull to stdout
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: b5184d3c2417c743b3fec34312270d243e4d980c
Component: engine
2014-09-06 01:06:18 -04:00
18d6c43123 add --all-tags to pull & pull latest by default
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 9c08364a412a51c80e8d17ae14f92549dc543e68
Component: engine
2014-09-03 18:03:14 +03:00
fe6985381c Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 16e850fe3ea42f5103c9a11f3db17d11dc4f6ada
Component: engine
2014-08-30 21:43:48 +04:00
6c5eee34ef List all ports when calling docker port container
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 4e340cedeccabcae8875dd35f8c984246d6c3bc1
Component: engine
2014-08-29 18:31:51 +10:00
4d890308d7 docker save: ability to save multiple images
Now from a single invocation of `docker save`, you can specify multiple
images to include in the output tar, or even just multiple tags of a
particular image/repo.

```
> docker save -o bundle.tar busybox ubuntu:lucid ubuntu:saucy fedora:latest
> tar tf ./bundle.tar | wc -l
42
> tar xOf ./bundle.tar repositories
{"busybox":{"latest":"2d8e5b282c81244037eb15b2068e1c46319c1a42b80493acb128da24b2090739"},"fedora":{"latest":"58394af373423902a1b97f209a31e3777932d9321ef10e64feaaa7b4df609cf9"},"ubuntu":{"lucid":"9cc9ea5ea540116b89e41898dd30858107c1175260fb7ff50322b34704092232","saucy":"9f676bd305a43a931a8d98b13e5840ffbebcd908370765373315926024c7c35e"}}
```

Further, this fixes the bug where the `repositories` file is not created
when saving a specific tag of an image (e.g. ubuntu:latest)

document multi-image save and updated API docs

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: e64131d1bf7c79358d5ee7a1a98626730db3593b
Component: engine
2014-08-28 20:22:33 -04:00
3cca8404b4 add the [OPTIONS] string automatically if there are flags defined
Signed-off-by: SvenDowideit <SvenDowideit@home.org.au>

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 8c6c4a12b7bd53c01998988593789aa16a6d9ac8
Component: engine
2014-08-28 08:50:50 +10:00
676eea0fcd Revert "--help option and help command should print to stdout not stderr"
This reverts commit 61b129d81802e3c988cc0e67e488b24968dd748a.

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 2e489073d94a7e2a5df115704a484c34f0b59f29
Component: engine
2014-08-27 18:59:13 +00:00