summaryrefslogtreecommitdiff
path: root/runconfig/config_test.go
Commit message (Collapse)AuthorAgeFilesLines
* runconfig, oci, image, layer, distribution: fix empty-lines (revive)Sebastiaan van Stijn2022-09-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | runconfig/config_test.go:23:46: empty-lines: extra empty line at the start of a block (revive) runconfig/config_test.go:75:55: empty-lines: extra empty line at the start of a block (revive) oci/devices_linux.go:57:34: empty-lines: extra empty line at the start of a block (revive) oci/devices_linux.go:60:69: empty-lines: extra empty line at the start of a block (revive) image/fs_test.go:53:38: empty-lines: extra empty line at the end of a block (revive) image/tarexport/save.go:88:29: empty-lines: extra empty line at the end of a block (revive) layer/layer_unix_test.go:21:34: empty-lines: extra empty line at the end of a block (revive) distribution/xfer/download.go:302:9: empty-lines: extra empty line at the end of a block (revive) distribution/manifest_test.go:154:99: empty-lines: extra empty line at the end of a block (revive) distribution/manifest_test.go:329:52: empty-lines: extra empty line at the end of a block (revive) distribution/manifest_test.go:354:59: empty-lines: extra empty line at the end of a block (revive) registry/config_test.go:323:42: empty-lines: extra empty line at the end of a block (revive) registry/config_test.go:350:33: empty-lines: extra empty line at the end of a block (revive) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* runconfig: ContainerDecoder(): fix handling of invalid JSONSebastiaan van Stijn2022-04-111-17/+20
| | | | | | | | Implement similar logic as is used in httputils.ReadJSON(). Before this patch, endpoints using the ContainerDecoder would incorrectly return a 500 (internal server error) status. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-271-2/+2
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* pkg/sysinfo.New(), daemon.RawSysInfo(): remove "quiet" argumentSebastiaan van Stijn2021-07-141-2/+2
| | | | | | | | | | | | The "quiet" argument was only used in a single place (at daemon startup), and every other use had to pass "false" to prevent this function from logging warnings. Now that SysInfo contains the warnings that occurred when collecting the system information, we can make leave it up to the caller to use those warnings (and log them if wanted). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* cgroup2: implement `docker info`Akihiro Suda2020-04-171-2/+3
| | | | | | ref: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
* runconfig/config_test.go: remove unused test-utilitiesSebastiaan van Stijn2019-09-181-56/+0
| | | | | | The tests using these functions were removed in e89b6e8c2d2c36c43f22aeaf2a885646c2994051 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update tests to use gotest.tools 👼Vincent Demeester2018-06-131-2/+2
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Automated migration usingDaniel Nephin2018-03-161-8/+8
| | | | | | gty-migrate-from-testify --ignore-build-tags Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Add canonical import commentDaniel Nephin2018-02-051-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Remove solaris filesMichael Crosby2017-10-241-5/+0
| | | | | | For obvious reasons that it is not really supported now. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
* Volume refactoring for LCOWSimon Ferquel2017-09-141-183/+0
| | | | Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
* Add decodeContainerConfig test removed from docker/cliDaniel Nephin2017-08-291-0/+239
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Remove string checking in API error handlingBrian Goff2017-08-151-2/+2
| | | | | | | | | | | | | | Use strongly typed errors to set HTTP status codes. Error interfaces are defined in the api/errors package and errors returned from controllers are checked against these interfaces. Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the line of causes one of the interfaces is implemented. The special error interfaces take precedence over Causer, meaning if both Causer and one of the new error interfaces are implemented, the Causer is not traversed. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Stop referring CLI flags in error messages if API client is unknownStanislav Bondarenko2017-05-221-4/+4
| | | | Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
* Add functional support for Docker sub commands on SolarisAmit Krishnan2016-11-071-0/+5
| | | | | | Signed-off-by: Amit Krishnan <krish.amit@gmail.com> Signed-off-by: Alexander Morozov <lk4d4@docker.com>
* Add engine-api types to dockerMichael Crosby2016-09-071-3/+3
| | | | | | | This moves the types for the `engine-api` repo to the existing types package. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
* Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6cQiang Huang2016-02-291-6/+6
| | | | Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
* Windows: Fix 'isolation'John Howard2016-02-101-6/+19
| | | | Signed-off-by: John Howard <jhoward@microsoft.com>
* Allow user to choose the IP address for the containerAlessandro Boch2016-01-081-8/+9
| | | | Signed-off-by: Alessandro Boch <aboch@docker.com>
* Modify import paths to point to the new engine-api package.David Calavera2016-01-061-2/+2
| | | | Signed-off-by: David Calavera <david.calavera@gmail.com>
* Move Config and HostConfig from runconfig to types/container.David Calavera2015-12-221-4/+5
| | | | | | | | - 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>
* Move StrSlice to types.David Calavera2015-12-221-6/+6
| | | | | | | This is a very docker concept that nobody elses need. We only maintain it to keep the API backwards compatible. Signed-off-by: David Calavera <david.calavera@gmail.com>
* Windows: Adds support for Hyper-V ContainersJohn Howard2015-10-291-0/+57
| | | | Signed-off-by: John Howard <jhoward@microsoft.com>
* Windows: Add volume supportJohn Howard2015-10-221-10/+27
| | | | Signed-off-by: John Howard <jhoward@microsoft.com>
* abstract the string slice struct to stringutils packageShijiang Wei2015-08-291-189/+6
| | | | Signed-off-by: Shijiang Wei <mountkin@gmail.com>
* Refactor test and add coverage to runconfigVincent Demeester2015-07-011-241/+76
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Move /nat to /pkg/natPeter Waller2015-06-301-1/+1
| | | | | | | | | | | | | | | | | | | By convention /pkg is safe to use from outside the docker tree, for example if you're building a docker orchestrator. /nat currently doesn't have any dependencies outside of /pkg, so it seems reasonable to move it there. This rename was performed with: ``` gomvpkg -vcs_mv_cmd="git mv {{.Src}} {{.Dst}}" \ -from github.com/docker/docker/nat \ -to github.com/docker/docker/pkg/nat ``` Signed-off-by: Peter Waller <p@pwaller.net>
* Fix unmarshalling of Command and EntrypointBrian Goff2015-06-261-0/+81
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Remove PortSpecs from ConfigAntonio Murdaca2015-05-291-16/+27
| | | | Signed-off-by: Antonio Murdaca <me@runcom.ninja>
* Modify volume mounts SELinux labels on the fly based on :Z or :zDan Walsh2015-05-271-0/+8
| | | | | | | | This patch is extending the qualifiers on the -v command to allow an admin to tell the system to relabel, content. There might be a need for something similar for changing the DAC Permissions. Signed-off-by: Jessica Frazelle <princess@docker.com>
* Allow links to be specified with only the name if this matches the aliasAntonio Murdaca2015-05-111-7/+0
| | | | Signed-off-by: Antonio Murdaca <me@runcom.ninja>
* trivial: typo cleanupDavid Mackey2015-04-271-1/+1
| | | | Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
* Decode container configurations into typed structures.David Calavera2015-04-151-0/+36
| | | | Signed-off-by: David Calavera <david.calavera@gmail.com>
* add ability to publish range of portsSrini Brahmaroutu2015-01-021-2/+2
| | | | | Closes #8899 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
* Remove unused sysinfo parameter to runconfig.ParseJohn Gossman2014-11-141-1/+1
| | | | | | Removing dead code. Signed-off-by: John Gossman <johngos@microsoft.com>
* Removed runconfig.ParseSubcommandOh Jinkyun2014-09-171-1/+1
| | | | | | Removed runconfig.ParseSubcommand, changed it to runconfig.Parse and editted related tests and modules Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
* update go import path and libcontainerVictor Vieux2014-07-241-1/+1
| | | | Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
* fix TestParseRunVolumes with Go 1.3 randomizationunclejack2014-06-261-2/+15
| | | | Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
* Update runconfig unit test for changesMichael Crosby2014-05-201-16/+5
| | | | Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
* Move volumesfrom to hostconfigMichael Crosby2014-04-081-29/+12
| | | | | | This also migrates the volumes from integration tests into the new cli integration test framework. Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
* Move DNS options to hostconfigMichael Crosby2014-04-071-41/+0
| | | | | | | The local resolver warning needed to be moved at daemon start because it was only show for the first container started anyways before having a default value set. Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
* Merge pull request #4775 from LK4D4/remove_duplicate_dns_#4714Michael Crosby2014-03-211-1/+1
|\ | | | | Remove duplication of Dns in config merging.
| * Remove duplication of Dns in config merging.LK4D42014-03-191-1/+1
| | | | | | | | | | Fixes #4714 Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
* | configurable dns search domainsDaniel Norberg2014-03-191-0/+16
|/ | | | | | | | Add a --dns-search parameter and a DnsSearch configuration field for specifying dns search domains. Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
* Update to double-dash everywhereTianon Gravi2014-03-131-8/+8
| | | | | | These were found using `git grep -nE '[^-a-zA-Z0-9<>]-[a-zA-Z0-9]{2}'` (fair warning: _many_ false positives there). Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
* move a unit test fileVictor Vieux2014-03-101-0/+154
| | | | Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
* Move the canonical run configuration objects to a sub-packageSolomon Hykes2014-02-111-0/+150
* Config is now runconfig.Config * HostConfig is now runconfig.HostConfig * MergeConfig is now runconfig.Merge * CompareConfig is now runconfig.Compare * ParseRun is now runconfig.Parse * ContainerConfigFromJob is now runconfig.ContainerConfigFromJob * ContainerHostConfigFromJob is now runconfig.ContainerHostConfigFromJob This facilitates refactoring commands.go and shrinks the core. Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)