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

2518 commits

Author SHA1 Message Date
Sebastiaan van Stijn
db738dd77f Merge pull request from vdemeester/3519-configurable-escape
Implement configurable escape key for attach/exec
2016-01-04 00:49:07 +01:00
Vincent Demeester
15aa2a663b Implement configurable detach key
Implement configurable detach keys (for `attach`, exec`, `run` and
`start`) using the client-side configuration

- Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start`
  commands.
- Adds a new configuration field (in `~/.docker/config.json`) to
  configure the default escape keys for docker client.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-01-03 23:03:39 +01:00
Vincent Demeester
1a5b97c761 Merge pull request from wenchma/same_name_of_container_image
Update integration tests when container and image have same name
2016-01-01 21:40:51 +01:00
Arnaud Porterie
e7c6206574 Merge pull request from aboch/npe
Properly initialize IpamConf structure in initBridgeDriver
2016-01-01 10:50:54 -08:00
Alessandro Boch
aa97eee1a3 Properly initialize IpamConf structure in initBridgeDriver
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-30 15:44:50 -08:00
David Calavera
102eb03c68 Merge pull request from tonistiigi/fix-comment-in-inspect
Fix missing comment in docker inspect
2015-12-30 15:07:04 -08:00
David Calavera
9aad7d209f Move test out of the windows build.
Because it can still run on windows server and fail because it doesn't
have `chown`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-30 16:36:48 -05:00
Tonis Tiigi
d32f43013b Fix missing comment in docker inspect
Fixes 

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-30 11:52:53 -08:00
David Calavera
56f8b051eb Merge pull request from mauri/add_owner
ADD files to a folder doesn't set correct UID and GID
2015-12-30 11:19:15 -08:00
David Calavera
51fa287368 Merge pull request from jecarey/16756-docker_cli_pull_test
Use of checkers in docker_cli_pull_test.go
2015-12-30 10:00:41 -08:00
David Calavera
708f98f5f9 Merge pull request from coolljt0725/fix_stats_update
Fix docker stats show wrong memory limit when do docker update
2015-12-30 08:17:42 -08:00
Mauricio Garavaglia
b638bc6f17 Fix files ownership when ADD is used
Signed-off-by: Mauricio Garavaglia <mauriciogaravaglia@gmail.com>
2015-12-30 11:35:19 -03:00
Vincent Demeester
c4486e48f2 Merge pull request from hqhq/hq_handle_dockerCmdInDir
Handle error for dockerCmdInDir
2015-12-30 15:25:20 +01:00
Qiang Huang
1b34008532 Handle error for dockerCmdInDir
Only two of these are not handled, the one in `TestBuildForceRm`
is intended to not be handled, while the other one in
`TestBuildResourceConstraintsAreUsed` causes problem.

In test case `TestBuildResourceConstraintsAreUsed`, somehow we
are not able to access network to get base image, but the error
message is:

```
Error: failed to inspect container : Unable to read inspect data: json: cannot unmarshal array into Go value of type types.ContainerJSON
```

Totally confusion.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-30 15:21:34 +08:00
Lei Jitang
518ed75e1a Fix docker stats show wrong memory limit when do docker update
When a container create with -m 100m and then docker update other
cgroup settings such as --cpu-quota, the memory limit show by
docker stats will become the default value but not the 100m.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-12-29 20:33:16 -05:00
David Calavera
8e034802b7 Remove usage of pkg sockets and tlsconfig.
- Use the ones provided by docker/go-connections, they are a drop in replacement.
- Remove pkg/sockets from docker.
- Keep pkg/tlsconfig because libnetwork still needs it and there is a
  circular dependency issue.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-29 19:27:12 -05:00
Wen Cheng Ma
9fbb1306e8 Update integration tests when container and image have same name
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-29 11:08:31 +08:00
David Calavera
78ce43bad8 Merge pull request from jfrazelle/seccomp-default
set default seccomp profile
2015-12-28 16:46:30 -08:00
Jess Frazelle
38440cadf3 Merge pull request from runcom/fix-net-none-build
integration-cli: fix --net=none build
2015-12-28 10:51:18 -08:00
Jessica Frazelle
15674c5fb7
add docs and unconfined to run a container without the default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-28 10:26:51 -08:00
Jessica Frazelle
a48fe62384
add default seccomp profile tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-28 10:26:48 -08:00
Jessica Frazelle
947293a280
set default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-28 10:18:47 -08:00
Qiang Huang
8799c4fc0f Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-28 19:19:26 +08:00
Antonio Murdaca
bb8e1dc8fa integration-cli: fix --net=none build
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-24 16:36:37 +01:00
Arnaud Porterie
914fad8b7d Merge pull request from runcom/pkg-authz-fixes
pkg: authorization: do not register the same plugin
2015-12-23 15:09:06 -08:00
Antonio Murdaca
c28fc06e00 pkg: authorization: do not register the same plugin
This patches avoids registering (and calling) the same plugin more than
once. Using an helper map which indexes by name guarantees this and keeps
the order.
The behavior of overriding the same name in a flag is consistent with,
for instance, the `docker run -v /test -v /test` flag which register
the volume just once.
Adds integration tests.

Without this patch:
```
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.080901676+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081213202+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081268132+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081699788+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081762507+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.082092480+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.628691038+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.629880930+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

With this patch:
```
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376523958+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376715483+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376771230+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.377698897+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.951016441+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

Also removes a somehow duplicate debug statement (leaving only the
second one as it's a loop of plugin's manifest):
```
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544090518+01:00" level=debug
msg="docker-novolume-plugin's manifest: &{[authz]}"
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544170677+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-23 21:08:40 +01:00
Daniel Nephin
83237aab2b Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-23 13:27:58 -05:00
David Calavera
95b708cf19 Merge pull request from aaronlehmann/v1-fallback-404
When a manifest is not found, allow fallback to v1
2015-12-23 10:01:39 -08:00
Zhang Wei
26dd026bd7 Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-12-23 13:26:40 +08:00
David Calavera
eacedcbe21 Merge pull request from calavera/test_event_observer
Extract event processing to a common function for testing.
2015-12-22 15:04:32 -08:00
Alexander Morozov
030347c3c9 Merge pull request from calavera/runconfig_to_types
Move container configuration types to api/types/container.
2015-12-22 14:22:08 -08:00
David Calavera
af51df20bd Extract event processing to a common function for testing.
We keep only one logic to test event related behavior that will help us
diagnose flacky event errors.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 17:10:06 -05:00
Dan Walsh
89a775d2dc No options to tmpfs is valid
If you run a

docker run command with --tmpfs /mountpoint:noexec

Or certain options that get translated into mount options, the mount command can get passed "" for mount data.
So this should be valid.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-12-22 14:15:07 -05:00
David Calavera
7ac4232e70 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:34:30 -05:00
David Calavera
056e744903 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05:00
Ma Shimiao
673f2b8697 upate TestRunWithBlkioInvalidWeightDevice with clearly invalid device name
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-22 12:43:42 +08:00
Aaron Lehmann
9d6acbee92 When a manifest is not found, allow fallback to v1
PR  caused compatibility issues with registries such as gcr.io
which support both the v1 and v2 protocols, but do not provide the same
set of images over both protocols. After , pulls from these
registries would never use the v1 protocol, because of the
Docker-Distribution-Api-Version header indicating that v2 was supported.

Fix the problem by making an exception for the case where a manifest is
not found. This should allow fallback to v1 in case that image is
exposed over the v1 protocol but not the v2 protocol.

This avoids the overly aggressive fallback behavior before  which
would allow protocol fallback after almost any error, but restores
interoperability with mixed v1/v2 registry setups.

Fixes 

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-12-21 18:19:38 -08:00
Sebastiaan van Stijn
312c82677b Merge pull request from Mashimiao/add-support-blkio_throtte_iops
Add support for blkio read/write iops device
2015-12-21 23:45:18 +01:00
James Carey
1b010516d0 Use of checkers in docker_cli_pull_test.go
Signed-off-by: James Carey <jecarey@us.ibm.com>
2015-12-21 14:04:38 -06:00
Alexander Morozov
42460b6772 Merge pull request from vdemeester/images-format
Add --format support to images command
2015-12-21 09:57:29 -08:00
Vincent Demeester
34a3c3cacf Add --format support to images command
- rename `api/client/ps` to `api/client/formatter`
- add a a image formatter

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-21 17:38:07 +01:00
Boaz Shuster
60b4db7eb1 Change the quiet flag behavior in the build command
Right now, the quiet (-q, --quiet) flag ignores the output
generated from within the container.

However, it ought to be quiet in a way that all kind
of diagnostic output should be ignored, unless the build
process fails.

This patch makes the quiet flag behave in the following way:
 1. If the build process succeeds, stdout contains the image ID
    and stderr is empty.
 2. If the build process fails, stdout is empty and stderr
    has the error message and the diagnostic output of that process.

If the quiet flag is not set, then everything goes to stdout
and error messages, if there are any, go to stderr.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2015-12-21 16:38:50 +02:00
Ma Shimiao
843084b08b Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-21 09:14:49 +08:00
Doug Davis
58c049595f Merge pull request from wenchma/add_checkduplicate_test
Add network create api test on CheckDuplicate
2015-12-19 10:46:11 -05:00
Wen Cheng Ma
5649dae89b Add network create api test on CheckDuplicate
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-19 22:29:30 +08:00
Aditi Rajagopal
278e75800c pkg/version.Version: use the new String() method
Resolves 

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
2015-12-18 15:29:32 -05:00
Antonio Murdaca
5a64c8027e authZ: more fixes
- fix naming and formatting
- provide more context when erroring auth
- do not capitalize errors
- fix wrong documentation
- remove ugly remoteError{}

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-18 16:29:01 +01:00
David Calavera
406da8616c Merge pull request from clnperez/fix-blkio-tests
Update TestRunWithBlkioInvalidDevice Tests
2015-12-17 10:23:59 -08:00
Antonio Murdaca
98be580794 Merge pull request from aaronlehmann/limit-v1-fallbacks
Limit v1 protocol fallbacks
2015-12-17 14:44:05 +01:00
Sebastiaan van Stijn
5baa93c04e Merge pull request from runcom/pkg-authZ-response
pkg: authorization: add Err to tweak response status code
2015-12-17 11:12:27 +01:00