Commit graph

47 commits

Author SHA1 Message Date
Alexander Morozov
0b589d313d pkg/parser/kernel: remove unused var block
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-06-02 10:50:36 -07:00
allencloud
dadbfbe65a make pkg/parsers support darwin and solaris
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 11:47:27 +08:00
Amit Krishnan
a531a67461 Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-23 16:37:12 -07:00
allencloud
b8047bf930 fix typos in pkg
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-04-09 21:18:15 +08:00
Daniel Nephin
c2c7305180 Remove unused parser functions that were replaced by go-connections/nat.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-22 19:06:49 -05:00
Daniel Nephin
8e98c98e52 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
Daniel Nephin
91d25997f1 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
David Calavera
207e5e455a Move filters package to the API.
These filters are only use to interchange data between clients and daemons.
They don't belong to the parsers package.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 18:13:26 -05:00
Justas Brazauskas
244162287a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
David Calavera
be362ef8ed Make filtering a linear operation.
Improves the current filtering implementation complixity.
Currently, the best case is O(N) and worst case O(N^2) for key-value filtering.
In the new implementation, the best case is O(1) and worst case O(N), again for key-value filtering.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-02 11:12:42 -05:00
David Calavera
c631a9bec7 Merge pull request #17438 from pmalmgren/17037-systemd226-cgroup
Fix docker status incorrectly reports containerized
2015-11-30 11:47:16 -08:00
Tonis Tiigi
2c84dccd2d Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
Alexander Morozov
2f11790e60 Use /usr/lib/os-release if /etc/os-release is missing.
As per os-release spec, /usr/lib/os-release file should be tried if
/etc/os-release is missing.

http://www.freedesktop.org/software/systemd/man/os-release.html

Thanks James Hunt <james.o.hunt@intel.com> and
Dimitri John Ledkov <dimitri.j.ledkov@intel.com> for contribution.

Close #17174

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-16 16:21:31 -08:00
Vladimir Varankin
47766786df Simplify address formating
Use `net.JoinHostPort()` which count IPv6 literals in `host`,
instead of relying on `net.ParseIP(host).To4()` side effects.

Signed-off-by: Vladimir Varankin <nek.narqo@gmail.com>
2015-11-13 20:32:32 +03:00
Vincent Demeester
bffb7509bb Fix panic in parsing /etc/os-release
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-05 19:59:29 +01:00
Peter Malmgren
39e1568228 Fix docker status incorrectly reports containerized. Fixes #17037
Signed-off-by: Peter Malmgren <ptmalmgren@gmail.com>
2015-11-04 00:08:46 +00:00
David Calavera
04ee01b8d6 Merge pull request #17573 from Microsoft/10662-parsersos
Windows: Fix unit tests parsers\os
2015-11-02 14:31:09 -08:00
John Howard
2ded2d1dd4 Windows: Fix unit tests parsers\os
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-02 11:28:47 -08:00
John Howard
e37f5839e8 Windows: Fix parsers kernel test
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-01 07:05:16 -08:00
Jessica Frazelle
bb4582aea6 update to binaries, fix parsers package, non-parallel test unit
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-27 14:43:25 -07:00
Lei Jitang
6159d85e26 Make default tls host work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-19 21:17:37 +08:00
Brian Goff
19561b96d5 Allow API to bind to ipv6 addresses
Use `net.SplitHostPort` which supports ipv6 rather than relying on
splitting on `:`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-12 13:55:27 -04:00
Antonio Murdaca
4c50b33ed5 Validate --cpuset-cpus, --cpuset-mems
Before this patch libcontainer badly errored out with `invalid
argument` or `numerical result out of range` while trying to write
to cpuset.cpus or cpuset.mems with an invalid value provided.
This patch adds validation to --cpuset-cpus and --cpuset-mems flag along with
validation based on system's available cpus/mems before starting a container.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-27 16:38:58 +02:00
Antonio Murdaca
d3fc1cb044 Remove PortMapping from container NetworkSettings
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-02 14:32:53 +02:00
Sven Dowideit
aca9c7cc9c 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
Sven Dowideit
6270b081d5 Exploring the code using unit tests - these 2 functions do not work consistently
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-08-28 10:29:52 +00:00
Kun Zhang
0fbf03ce5f change exportImage to top-level func
Signed-off-by: Kun Zhang <zkazure@gmail.com>

remove useless FIXME

Signed-off-by: Kun Zhang <zkazure@gmail.com>

fix

Signed-off-by: Kun Zhang <zkazure@gmail.com>
2015-08-10 22:18:57 +08:00
Alexey Guskov
4e30080c64 make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-07-29 21:25:56 +03:00
Vincent Demeester
9bcb3cba83 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-27 21:26:21 +02:00
Antonio Murdaca
b93e4f669a Allow starting a container with an existing hostConfig which contains links
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-21 22:10:00 +02:00
Victor Vieux
3314761f62 add support for base path in docker cli -H
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-07-08 15:42:40 -07:00
Vincent Demeester
cc3ebfbdba Add test coverage to pkg/parsers
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-06-29 22:30:11 +02:00
Jessie Frazelle
9c5e24b280 Merge pull request #13099 from Microsoft/10662-pkgparsers
Windows: Implement parsers:kernel+os
2015-05-12 16:07:43 -07:00
John Howard
b1c7a7da21 Windows: Impl pkg\parsers kernel+os
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-12 14:41:02 -07:00
Antonio Murdaca
3a89ef7153 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
Antonio Murdaca
f023195a1e Replace json.Unmarshal with json.Decoder().Decode()
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-26 15:02:01 +02:00
Andy Goldstein
18332a6073 Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2015-03-17 10:10:42 +00:00
Darren Shepherd
6311ff4ab2 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Arnaud Porterie
29e7195aaf Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00
Srini Brahmaroutu
c466b9baa5 add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-02 23:21:26 +00:00
Brian Goff
32fb3913b5 Cleanup ParseHost
Current implementation is comingling things that ought not be together.
There are _some_ similarities between parsing for the different proto
types, but they are more different than alike, making the code extremely
difficult to reason about.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-11-25 18:55:40 -05:00
Oh Jinkyun
2ada51fd7f Fix for #8777
Now filter name is trimmed and lowercased before evaluation for case
insensitive and whitespace trimemd check.

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
2014-11-20 13:36:46 +09:00
Yohei Ueda
3a138a9b5e Fix the unit test not to remove /tmp
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-07 02:43:59 +09:00
Srini Brahmaroutu
ab81bfc8f5 Adding capability to filter by name, id or status to list containers api
Closes #7599

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-10-20 18:33:20 +00:00
Tianon Gravi
286bd69270 Replace "amd64" build tags with "cgo" as appropriate, and remove where unnecessary
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-06 17:20:21 -06:00
Tibor Vass
f7cec086a6 Add OS to docker info
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-30 10:37:52 -04:00
Erik Hollensbe
c91872166b Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-29 13:09:10 -07:00