Commit graph

68 commits

Author SHA1 Message Date
Tonis Tiigi
534a90a993 Add Swarm management backend
As described in our ROADMAP.md, introduce new Swarm management API
endpoints relying on swarmkit to deploy services. It currently vendors
docker/engine-api changes.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-06-13 22:16:18 -07:00
allencloud
c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Daniel Nephin
667dcb0e8e Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin
69264beb40 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Dan Walsh
9caf7aeefd Add support for setting sysctls
This patch will allow users to specify namespace specific "kernel parameters"
for running inside of a container.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-04-12 13:37:31 -04:00
allencloud
5c161ade98 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-31 13:26:46 +08:00
David Calavera
677a6b3506 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-14 16:44:37 -05:00
Daniel Nephin
0007f5a859 Move some validators from opts to runconfig/opts.
These validators are only used by runconfig.Parse() or some other part of the
client, so move them into the client-side package.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 14:35:36 -05:00
Daniel Nephin
f015c29193 Move runconfig blkiodev options and parsing into runconfig/opts package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-22 18:20:21 -05:00
David Calavera
0aab83d996 Move blkiodev package to types.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:46 -05: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
Daniel Nephin
233a4fc33c Move ParseLink and validators into runconfig.parse where they are used.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-16 14:22:54 -05:00
David Calavera
b44b5bbc8b Merge pull request #18682 from calavera/replace_units_package
Replace pkg/units with docker/go-units.
2015-12-16 10:48:59 -08:00
David Calavera
4fef42ba20 Replace pkg/units with docker/go-units.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-16 12:26:49 -05:00
Daniel Nephin
9b99591054 Move ParseDockerDaemonHost to opts/ package.
This function was only being used from a single place opts/opts.go. This
change moves it from a incohesive package (parsers) to the single place it
is used.

Also made a bunch of the helper methods private because they are not used
by any external modules.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-15 20:53:17 -05:00
Ma Shimiao
3f15a055e5 Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-04 09:26:03 +08:00
Ma Shimiao
0fbfa1449d Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-11-11 23:06:36 +08:00
Tibor Vass
62b484411e Merge pull request #17779 from calavera/fix_dns_regression
Use an empty slice as default value for DNS, DNSSearch and DNSOptions.
2015-11-09 18:07:07 -05:00
David Calavera
f1a74a89f8 Use an empty slice as default value for DNS, DNSSearch and DNSOptions
So we don't print those <no value> in the client and we don't fail
executing inspect templates with API field names.

Make sure those fields are initialized as empty slices when
a container is loaded from disk and their values are nil.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-09 12:46:48 -05:00
John Howard
eb2acb8f0e Windows [TP4] localhost mitigation
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-06 13:52:59 -08:00
Tibor Vass
e74cf8acad Merge pull request #16433 from Microsoft/10662-volumes5
Windows: [TP4] Add volume support
2015-10-23 18:43:07 -04:00
Sebastiaan van Stijn
448398c2a8 Merge pull request #15780 from mountkin/build-multi-tags
Add ability to add multiple tags with docker build
2015-10-23 13:50:35 -07:00
Shijiang Wei
c2eb37f9ae Add ability to add multiple tags with docker build
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-10-24 00:59:56 +08:00
John Howard
a7e686a779 Windows: Add volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-22 10:42:53 -07:00
Lei Jitang
fbb01b8162 Make default tls host work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-19 21:17:37 +08:00
Doug Davis
ba973f2d74 Remove used param on ParseHost
The first param on opts.ParseHost() wasn't being used for anything.

Once we get rid of that param we can then also clean-up some code
that calls ParseHost() because the param that was passed in wasn't
being used for anything else.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-10-11 20:45:17 -07:00
Sven Dowideit
50f0906007 Default the tcp port to 2376 if tls is on, and 2375 if not
Refactor so that the Host flag validation doesn't destroy the user's input,
and then post process the flags when we know the TLS options

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-10-09 17:48:03 -07:00
Vincent Demeester
7335544fd0 Revert environment regexp from 13694
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-28 20:26:20 +02:00
Ma Shimiao
185544a4fe opts/opts.go: fix typo
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-09-14 14:48:09 +08:00
Sven Dowideit
3d510f15da Change ParseTCPAddr to use tcp://127.0.0.0:2375 format as default consistently
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-08-29 11:23:51 +00:00
Vincent Demeester
0bd016b1c3 Finish linting opts and trust package.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-27 17:36:11 +02:00
Brian Goff
b3b7eb2723 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00
Qiang Huang
429423624c Add mode check for device
This fixes two problems:
1. docker run --device /dev/sda:rw ubuntu bash doesn't work
2. --device /dev/zero:/dev/noro:ro doesn't show clear error message,
but fail when writing to cgroup file.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-24 17:57:12 +08:00
Qiang Huang
c99ed5ae5d Change return value for ValidateMountMode
1. rename it from ValidateMountMode to ValidMountMode
Because it's a function simply check mount mode is valid or not.
2. remove the rw check return value
It's not supposed to be combined into this function, and we already
have a function for that check.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-24 17:28:19 +08:00
Qiang Huang
81cc8ebc93 Change all docker -d to docker daemon
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-10 20:48:08 +08:00
Antonio Murdaca
0e69318b27 Remove unused functions
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-25 19:54:05 +02:00
Tibor Vass
96ce3a194a cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 19:44:46 -04:00
Vincent Demeester
dfc6c04fa3 Add test coverage to opts and refactor
- Refactor opts.ValidatePath and add an opts.ValidateDevice
  ValidePath will now accept : containerPath:mode, hostPath:containerPath:mode
  and hostPath:containerPath.
  ValidateDevice will have the same behavior as current.

- Refactor opts.ValidateEnv, opts.ParseEnvFile
  Environment variables will now be validated with the following
  definition :
  > Environment variables set by the user must have a name consisting
  > solely of alphabetics, numerics, and underscores - the first of
  > which must not be numeric.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-12 10:33:30 +02:00
Doug Davis
3fcf53db92 Minor doc edit to add clarity around the --volume path format
Also add a comment to the ValidatePath func so devs/reviewers
know exactly what its looking for.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-06-05 15:11:42 -07:00
Antonio Murdaca
e8c88d2533 Add syslog-address log-opt
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-29 00:42:11 +02:00
Antonio Murdaca
c6e6223ed7 Allow links to be specified with only the name if this matches the alias
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-11 21:50:47 +02:00
wlan0
dca9e02b15 Add log opts flag to pass in logging options
Signed-off-by: wlan0 <sidharthamn@gmail.com>
2015-05-04 14:39:48 -07:00
jhowardmsft
cbf9a64cb5 Windows: Change default listener to HTTP
Signed-off-by: jhowardmsft <jhoward@microsoft.com>
2015-04-30 19:49:45 -07:00
Antonio Murdaca
4b9fe9c298 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02:00
George MacRorie
664ef0cbe2 Cleanup redundant else statements find via golint #11602
Signed-off-by: George MacRorie <gmacr31@gmail.com>
2015-03-23 20:40:29 +00:00
Tomáš Hrčka
b2f05c2207 Restrict domain name to 255 characters
Signed-off-by: Tomáš Hrčka <thrcka@redhat.com>

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
2015-03-09 10:14:56 -07:00
Jessie Frazelle
df7ba57f5f Merge pull request #9437 from cpuguy83/set_rlimits_in_container
Allow setting ulimits for containers
2015-03-04 04:00:17 -08:00
Lei Jitang
2ba0fbb0ae Add validate the input mac address on docker run command
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-02-27 07:27:12 -08:00
Brian Goff
3f39050637 Allow setting ulimits for containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-25 19:37:43 -05:00
Phil Estes
1ce9fa1c60 Add more helpful error message for -add-host
Fixes: #10655

As noted in the issue, bad format was being returned even if the format
was appropriate, but the IP was invalid.  This adds a better error
message for when the IP address fails validation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-02-09 12:45:50 -05:00