Граф коммитов

137 Коммитов

Автор SHA1 Сообщение Дата
Alexandre Beslic ca62cace6e Merge pull request #17538 from calavera/deprecated_bridge_interface
Fix network inspect for default networks.
2015-10-30 16:03:51 -07:00
David Calavera 77b18ba090 Fix network inspect for default networks.
- Keep old fields in NetworkSetting to respect the deprecation policy.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-10-30 16:55:21 -04:00
Alessandro Boch 637e5de800 Modify Network structure json tags
- So that they comply with docker inspect convention
  Which is allowing camel case for json field names

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-30 11:23:59 -07:00
David Calavera cfdb5d9607 Merge pull request #17393 from tiborvass/carry-17360
Carry Fix docker inspect container only reports last assigned information
2015-10-27 17:00:41 -07:00
David Calavera 85bc8f457f Extract network settings types for inspect.
Keeping backwards compatibility.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-27 19:16:21 -04:00
Madhu Venugopal 50ab8c9ebb Enhancing --cluster-advertise to support <interface-name>
--cluster-advertise daemon option is enahanced to support <interface-name>
in addition to <ip-address> in order to amke it  automation friendly using
docker-machine.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-27 11:03:22 -07:00
Vincent Demeester 1d52d42343 Use RepoTags & RepoDigest in inspect
To be coherent with /images/json (images command)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-22 23:00:59 +02:00
Sebastiaan van Stijn 65408aa1c2 Merge pull request #17136 from gesellix/change-route-volume-create
rename `POST /volumes` to `POST /volumes/create`
2015-10-21 10:21:27 -07:00
Antonio Murdaca 70774718db Return empty Config fields, now omitempty, for API < 1.21
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-10-19 19:09:36 +02:00
Tobias Gesellchen 339d97a002 rename `POST /volumes` to `POST /volumes/create` to be consistent with the other `POST /.../create` endpoints
see #17132

Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
2015-10-17 14:13:40 +02:00
Madhu Venugopal e9f3936a51 Pass network driver option in docker network command
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-16 14:33:54 -07:00
Alexandre Beslic 2ac996bfe2 Merge pull request #16910 from mavenugo/ipam
Vendoring libnetwork for the pluggable IPAM driver support
2015-10-13 14:41:19 -07:00
Vincent Demeester 2e071f2b86 Merge pull request #15796 from azurezk/add-size-to-inspect
add container size info to inspect
2015-10-13 23:16:10 +02:00
Madhu Venugopal cb312ea24c IPAM API & UX
introduced --subnet, --ip-range and --gateway options in docker network
command. Also, user can allocate driver specific ip-address if any using
the --aux-address option.
Supports multiple subnets per network and also sharing ip range
across networks if the network-driver and ipam-driver supports it.
Example, Bridge driver doesnt support sharing same ip range across
networks.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-13 11:03:03 -07:00
Antonio Murdaca 90909a208f Fix Config.Cpuset from API < 1.20
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
2015-10-13 09:09:05 +02:00
Zhang Kun f2552d8162 add size to inspect
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-10-10 20:44:29 +08:00
Lei Jitang bf6a70b1e1 Add more cgroup config to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-09 03:02:04 -04:00
Madhu Venugopal ba5ffca8e5 Network remote APIs using new router, --net=<user-defined-network> changes
* Moving Network Remote APIs out of experimental
* --net can now accept user created networks using network drivers/plugins
* Removed the experimental services concept and --default-network option
* Neccessary backend changes to accomodate multiple networks per container
* Integration Tests

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-07 03:54:19 -07:00
Lei Jitang 1e31d71fe4 Fix docker ps truncate long image name by default
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-02 22:56:42 +08:00
David Calavera 60d6d6c4c4 Extract api types to version packages.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-30 14:14:27 -04:00
Arnaud Porterie ee0a698ef1 Add builtin nodes discovery
Use `pkg/discovery` to provide nodes discovery between daemon instances.

The functionality is driven by two different command-line flags: the
experimental `--cluster-store` (previously `--kv-store`) and
`--cluster-advertise`. It can be used in two ways by interested
components:

1. Externally by calling the `/info` API and examining the cluster store
   field. The `pkg/discovery` package can then be used to hit the same
   endpoint and watch for appearing or disappearing nodes. That is the
   method that will for example be used by Swarm.
2. Internally by using the `Daemon.discoveryWatcher` instance. That is
   the method that will for example be used by libnetwork.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-09-25 14:52:09 -07:00
Zhang Kun f4ab1e89eb add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-09-21 21:15:32 +08:00
Hu Keping 9db8d4ca2a Refactor the statistics of network in docker stats
For now docker stats will sum the rxbytes, txbytes, etc. of all
the interfaces.

It is OK for the output of CLI `docker stats` but not good for
the API response, especially when the container is in sereval
subnets.

It's better to leave these origianl data to user.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-09-15 15:40:34 +08:00
Rozhnov Alexandr 6b785d2888 Added tags list to /images/:id/json api.
It closes #10139.

Signed-off-by: Rozhnov Alexandr <nox73@ya.ru>
2015-09-10 11:55:01 +03:00
Brian Goff 6056d1294c Merge pull request #15798 from calavera/volume_driver_host_config
Move VolumeDriver to HostConfig to make containers portable.
2015-09-08 22:05:40 -04:00
David Calavera 37fd79440f Make RegistryConfig a typed value in the api.
Remove possible circular dependency that prevented us from using a real
type.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-07 19:29:33 -04:00
David Calavera 1b7bf34a5a Move VolumeDriver to HostConfig to make containers portable.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-04 12:42:44 -04:00
Alexander Morozov c18c1541ac Merge pull request #15023 from hqhq/hq_add_status_in_inspect
Add status string to State field for inspect
2015-08-28 08:27:36 -07:00
Brian Goff c1b1a049ab Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00
David Calavera b269fbc857 Merge pull request #15370 from cpuguy83/better_error_on_client_connect
Better/more specific error messages on connect
2015-08-07 13:00:44 -07:00
Zhang Wei ba92f991f0 fix golint warnings/errors on package api/types/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-08-07 09:43:43 +08:00
Brian Goff 36c9cf72d3 Better/more specific error messages on connect
Closes #15309

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-06 16:41:37 -04:00
Aaron Lehmann 76aa299c38 Fix uses of "int" where "int64" should be used instead
Some structures use int for sizes and UNIX timestamps. On some
platforms, int is 32 bits, so this can lead to the year 2038 issues and
overflows when dealing with large containers or layers.

Consistently use int64 to store sizes and UNIX timestamps in
api/types/types.go. Update related to code accordingly (i.e.
strconv.FormatInt instead of strconv.Itoa).

Use int64 in progressreader package to avoid integer overflow when
dealing with large quantities. Update related code accordingly.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 16:31:40 -07:00
Josh Hawn e517c492ee Fix `docker cp` Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-30 12:14:28 -07:00
Qiang Huang 0c87a0a0e6 Add status string to State field for inspect
Fixes: #13579

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-28 08:48:27 +08:00
John Howard 039b766c43 Windows: Factoring out unused fields
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-27 17:44:18 -07:00
Jessie Frazelle 60265e8698 Merge pull request #14852 from rhatdan/relabel
Rename internal field Relabel to Mode
2015-07-27 10:31:08 -07:00
Antonio Murdaca 10f7d1fc51 Format times in inspect command with a template as RFC3339Nano
In 1.6.2 we were decoding inspect API response into interface{}.
time.Time fields were JSON encoded as RFC3339Nano in the response
and when decoded into interface{} they were just strings so the inspect
template treated them as just strings.
From 1.7 we are decoding into types.ContainerJSON and when the template
gets executed it now gets a time.Time and it's formatted as
2015-07-22 05:02:38.091530369 +0000 UTC.
This patch brings back the old behavior by typing time.Time fields
as string so they gets formatted as they were encoded in JSON -- RCF3339Nano

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-26 15:25:08 +02:00
Dan Walsh 13cd98e837 Rename internel field Relabel to Mode
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-07-24 07:14:37 -04:00
Sebastiaan van Stijn 21a7146744 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
David Calavera 727484c08a Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
Josh Hawn e13c7fc85a api/server: StatPath, ArchivePath, ExtractToDir
Adds http handlers for new API endpoints:

GET ContainersArchivePath
  Return a Tar Archive of the contents at the specified location in a
  container. Deprecates POST ContainersCopy. Use a HEAD request to stat
  the resource.

PUT ContainersExtractToDir
  Extract the Tar Archive from the request body to the directory at the
  specified location inside a container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-21 15:19:52 -07:00
Josh Hawn 011c5e5992 daemon: container ArchivePath and ExtractToDir
The following methods will deprecate the Copy method and introduce
two new, well-behaved methods for creating a tar archive of a resource
in a container and for extracting a tar archive into a directory in a
container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-21 11:20:10 -07:00
Vincent Batts 45e541c6b4 Merge pull request #14047 from Microsoft/10662-versionadd
Add build time to version and tidy output
2015-06-23 09:57:31 -07:00
John Howard 50d0aa26d8 Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-22 13:00:27 -07:00
Sujith Haridasan f96964c6c2 Display when a container is in --net=host in docker ps
Display */tcp, */udp when a container is in --net=host in docker ps

Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
2015-06-22 11:44:33 +05:30
Lei Jitang 5e8a3d432f Add bridge-nf-call-iptables/bridge-nf-call-ipv6tables to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-06-17 09:19:11 +08:00
Vivek Goyal d189422b02 docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields
DeviceId, DeviceSize and DeviceName are being exported from devicemapper.
Other graph drivers can export fields as they see fit.

This data can be used to mount the thin device outside of docker and tools
can look into image/container and do some kind of inspection.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-06-15 14:05:10 -04:00
Darren Shepherd ada31bbfd2 Set omitempty for IP and PublicPort to conform w/ API 1.18
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-06-12 09:49:53 -07:00
Arnaud Porterie bb395aba7d Merge pull request #13731 from jfrazelle/fix-version-on-old-versions
fix version struct on old versions
2015-06-03 17:24:53 -07:00
Jessica Frazelle 76274c1fbb fix version struct on old versions
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-06-03 16:56:50 -07:00
Antonio Murdaca a261002a97 SizeRW & SizeRootFs omitted if empty in /container/json call
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-03 23:13:56 +02:00
Antonio Murdaca 47d253d4f8 Do not omit empty json field in /containers/json api response
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-03 18:53:40 +02:00
Antonio Murdaca fbea073259 Expose old config field for api < 1.19
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-06-02 23:37:59 +02:00
Brian Goff 649296e1ab Merge pull request #13320 from coolljt0725/add_stats_no_stream_show_cpu_usage
Add docker stats --no-stream show cpu usage
2015-06-01 09:40:04 -07:00
Lei Jitang d5b37fff32 Add docker stats --no-stream show cpu usage
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-31 01:25:51 +08:00
Jessica Frazelle eed2235859 fix experimental version and release script
add api version experimental

Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-29 10:00:22 -07:00
Brian Goff 99c8f6b555 Merge pull request #13269 from Microsoft/10662-statsrefactor
Windows: refactor stats
2015-05-28 12:46:34 -04:00
Arnaud Porterie 89e8a3767d Add DOCKER_EXPERIMENTAL environment variable
The DOCKER_EXPERIMENTAL environment variable drives the activation of
the 'experimental' build tag.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-20 12:21:17 -07:00
John Howard d573a0ef74 Windows: refactor stats
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-20 09:08:45 -07:00
Victor Vieux 072f4ab866 Revert "Fix inconsistent date formats in API"
This reverts commit 945fc9d882324ac87505e34bb74e6ebe30be1309.

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-14 17:31:45 -07:00
Hu Keping 20c905309a Fix inconsistent date formats in API
Prior to this patch, the response of
- GET /images/json
- GET /containers/json
- GET /images/(name)/history

display the Created Time as UNIX format which doesn't make sense.

These should be more readable as CLI command `docker inspect` shows.

Due to the case that an older client with a newer version daemon, we
need the version check for now.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-05-14 18:58:55 +08:00
Antonio Murdaca c42d3fa07d Remove API codepaths < 1.12
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-12 20:09:49 +02:00
Ma Shimiao 13fc025d3a add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-05-09 10:02:46 +08:00
HuKeping f99031fb4d Feature: option for disable OOM killer
Add cgroup support for disable OOM killer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-05-04 21:11:29 +08:00
Srini Brahmaroutu 727553c9a6 Allow go template to work properly with inspect
Closes #11641

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-23 18:25:18 +00:00
Antonio Murdaca e03b77593f Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02:00
jianbosun e5b6a3f5f4 remove execCreate & execStart from job
Also removed the function ExecConfigFromJob

Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-22 13:51:57 -07:00
Lei Jitang 50d395a900 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-04-20 08:16:47 -07:00
Hu Keping ddb0579c36 Remove Job from Info API
Two main things
- Create a real struct Info for all of the data with the proper types
- Add test for REST API get info

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-04-20 18:14:06 +08:00
Antonio Murdaca 796fa0fe3e Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-17 14:27:38 +02:00
Michael Crosby 9a14865c94 Merge pull request #12259 from duglin/RemoveJobTop
Remove Job from `docker top`
2015-04-10 10:56:01 -07:00
David Young b0027492ee Add comment column in docker history command output
Signed-off-by: David Young <yangboh@cn.ibm.com>
2015-04-09 21:29:41 -04:00
Doug Davis acb5f8b8f1 Remove Job from `docker top`
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-09 18:17:50 -07:00
Alexander Morozov c6409fb39a Removed engine from /copy
* Client and server use types.CopyConfig
* API calls container.Copy directly

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-09 13:05:31 -07:00
Doug Davis c3e2ac28fa Remove Job from `docker images`
Also removes engine.Table

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-08 19:33:01 -07:00
Megan Kostick 6ce5f06f05 Fixing JSON Tags
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
2015-04-08 12:05:12 -07:00
Doug Davis e0262feadb Last step in removing engine.Tabel from api/client/*
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-06 10:55:53 -07:00
Doug Davis 23dda11928 Remove engine.Table from docker history and docker rmi
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-03 08:31:30 -07:00
Doug Davis d2808fcf58 Remove use of Table from 'docker diff'
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-02 16:55:58 -07:00
Jamie Hannaford cae5a121a9 Use ContainerCommitResponse struct for Commit cmd
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
2015-03-28 17:55:45 +01:00
Nick Parker 6c2fe4f88b fixes comment for ContainerWaitResponse struct
Signed-off-by: Nick Parker <nikaios@gmail.com>
2015-03-25 22:22:58 -06:00
Nick Parker 400c3f1f99 Changes response of postContainersWait to use a struct
Signed-off-by: Nick Parker <nikaios@gmail.com>
2015-03-25 21:01:14 -06:00
Antonio Murdaca a5c850dcf3 Return AuthResponse from postAuth api endpoint, Fixes #11607
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 09:57:01 +01:00
Antonio Murdaca fd12f28c86 Return ContainerExecCreateResponse from container exec start API endpoint, Fixes #11613
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 00:41:54 +01:00
Michael Crosby e0d6d7cefa Add ContainerCreateResponse type
This type is produced on the server side and is a type safe struct that
can be encoded to json.  It is consumed via the client.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-24 15:27:49 -08:00
Michael Crosby 5c9249a90f Move stats api types into api/types package
Move the stats structs from the api/stats package into a new package
api/types that will contain all the api structs for docker's api request
and responses.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-24 10:47:47 -08:00