Commit Graph

201 Commits

Author SHA1 Message Date
4d9279a3fb Improve documentation and golint compliance of registry package
* Add godoc documentation where it was missing

* Change identifier names that don't match Go style, such as INDEX_NAME

* Rename RegistryInfo to PingResult, which more accurately describes
  what this structure is for. It also has the benefit of making the name
  not stutter if used outside the package.

Updates #14756

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4fcb9ac40ce33c4d6e08d5669af6be5e076e2574
Component: engine
2015-07-24 11:55:07 -07:00
c4ddbfd5f9 Merge pull request #14545 from Djelibeybi/oraclelinux6-rpm
Updated docker-engine.spec to build on Oracle Linux 6.
Upstream-commit: c6f4c192fe33bd04fb2b624c115d176f17de7a06
Component: engine
2015-07-23 13:29:48 -07:00
81c6019b8c pass DOCKER_EXPERIMENTAL into build images
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 76d6751600fe91424171b886fdd87fb3eb3a1380
Component: engine
2015-07-23 09:42:22 -07:00
e804755952 Merge pull request #14862 from vdemeester/validate-lint-all-files
Update validate-lint to lint all go files
Upstream-commit: 3198e76b7758ece76600562d960cb17ad735c7ca
Component: engine
2015-07-22 15:18:02 -07:00
bdf2ee5403 Update validate-lint to lint all go files
By default, using go with package will only validate the go file for the
current platform (or at last misses file_windows.go for example). This
tries to fix that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fa34f07ec04e22b2e0631cc0656ba569b453d21c
Component: engine
2015-07-22 23:21:18 +02:00
76ec388f40 Merge pull request #14864 from ewindisch/apparmor-engine-policy
Add AppArmor policy for the docker binary
Upstream-commit: a7d84503128720612022d46f5c9c04602cb19f05
Component: engine
2015-07-22 13:56:33 -07:00
792828f992 Merge pull request #14628 from estesp/update-docker-py
Update docker-py commit to current master (~1.3.1 release)
Upstream-commit: c328e0c8274ab7b988e8c279f447a1074e3b0631
Component: engine
2015-07-22 12:41:41 -07:00
ae18180fac Add AppArmor policy for the engine
Wraps the engine itself with an AppArmor policy.

This restricts what may be done by applications
we call out to, such as 'xz'.

Significantly, this policy also restricts the policies
to which a container may be spawned into. By default,
users will be able to transition to an unconfined
policy or any policy prefaced with 'docker-'.

Local operators may add new local policies prefaced
with 'docker-' without needing to modify this policy.
Operators choosing to disable privileged containers
will need to modify this policy to remove access
to change_policy to unconfined.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 39dae54a3f40035b1b7e5ca86c53d05dec832ed2
Component: engine
2015-07-22 14:20:50 -04:00
1ec6bf08bd Update docker-py to current master (~docker-py 1.3.1)
The docker-py commit used in the standard `Dockerfile` is from Feb. 2015
and is out of date with the current API level and has fixes for things
like the new docker cli config location and registry v2 changes/API
responses as well.

Also pass "NOT_ON_HOST=true" to docker-py test suite so that tests
relying on direct HOST interaction (versus running in a container) are
skipped.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 65fb04228eba7c6d8640bc8de8800ade05efe2f1
Component: engine
2015-07-22 13:17:59 -04:00
596da1de67 Update linted package list
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: b7184f857489bee6b547eb10a3dfefcd3e420767
Component: engine
2015-07-22 08:46:42 -07:00
50e8a78638 Merge pull request #14851 from bfirsh/golint-integration-cli
Golint integration-cli
Upstream-commit: 875fffdff886205d096ab348d94b5079885f17fb
Component: engine
2015-07-22 11:28:19 -04:00
6aa4de764e Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 6b3c928140193f911b73f87bb8b07f54bba5a63a
Component: engine
2015-07-22 14:03:50 +01:00
e1e5cbd789 pkg: mount: golint
Fix the following warnings:

pkg/mount/mountinfo.go:5:6: type name will be used as mount.MountInfo by other packages, and that stutters; consider calling this Info
pkg/mount/mountinfo.go:7:2: struct field Id should be ID

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d
Component: engine
2015-07-22 10:26:10 +02:00
3abbd3cbb1 Update validate-lint script
Add a set of newly linted packages, and fix the script.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 7f02cc420ab068f129ec24f3c7514a838bddb1ce
Component: engine
2015-07-21 15:02:46 -07:00
8f6577a7cd Merge pull request #14780 from icecrime/14756_add_golint
Add golint to the development toolbox
Upstream-commit: e4f1cf787c50e0f4e97ea5d0aee5a7b4c5b40ff5
Component: engine
2015-07-21 09:50:58 -07:00
5bcf01ef67 Add golint to the development toolbox
Add golint to the Dockerfile, and a `validate-lint` task to the
Makefile. Currently, the linter will process a harcoded list of packages
that will expand as we fix more warnings. Eventually, the linter should
process all subpackages of the repo (excluding vendored code).

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 6cce8d18384a5ae1212e7b0f7b7ac9662a89c8c1
Component: engine
2015-07-21 09:00:36 -07:00
74cf202b4f Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 80d99236c1ef9d389dbaca73c1a949da16b56b42
Component: engine
2015-07-21 11:05:53 -04:00
4ee32ba904 Add release-deb & release-rpm scripts.
These will create the apt & yum repos for the deb/rpms generated by build-deb
and build-rpm.

Adds sign-repo script which signs the repo metadata with a gpg key.

Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: c850e97c84abffc71509692ab1accd38408fa51b
Component: engine
2015-07-15 15:54:00 -07:00
13a7ed0799 Updated docker-engine.spec to build on Oracle Linux 6.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: 865d3a148875485a3749be83b67ea7449830e6b6
Component: engine
2015-07-11 09:53:00 +10:00
fe10418da9 Remove specific dependencies and let RPM auto-generate the dependencies on libraries during build.
Signed-off-by: Avi Miller <avi.miller@oracle.com>
Upstream-commit: e3b5889783d5e83a9cecc0867e7af73d5fd023f0
Component: engine
2015-07-08 15:30:42 +10:00
7eb8fa7601 Adding Group Metatag
Signed-off-by: evalle <shmarnev@gmail.com>
Upstream-commit: 0db7c2a9a686a4101f11ab362e3ab8327b9ea591
Component: engine
2015-07-07 09:08:55 +02:00
888e384d70 Add branch and build time to version
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 87eae0d659d6e4bb75942455f3f73a74f54ed3b9
Component: engine
2015-06-22 13:00:27 -07:00
9e396973a1 Remove timer and use -check.v for tests formatting
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4253a1f87ee90e3827090dc380bfda2332e23ff3
Component: engine
2015-06-18 14:22:40 -07:00
809c6b1b19 Check for apparmor file before reading it
I ran a single integration test and got an error that the file
/sys/module/apparmor/parameters/enabled doesn't exist. I don't have
apparmor installed. So, just check the file first to avoid a confusing
error.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 691ed6ef995b8ee7cf9bdcea29ccf4b58a244234
Component: engine
2015-06-17 11:58:17 -05:00
6fba235ed8 Add new "validate-pkg" bundlescript
This helps ensure that `github.com/docker/docker/pkg/...` is actually safe to use in isolation (ie, doesn't import anything from `github.com/docker/docker` except other things from `pkg` or vendored dependencies).

Adding `github.com/docker/docker/utils` to the imports of `pkg/version/version.go`:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
These files import internal code: (either directly or indirectly)
 - pkg/version/version.go imports github.com/docker/docker/autogen/dockerversion
 - pkg/version/version.go imports github.com/docker/docker/utils
```

And then removing it again:

```
---> Making bundle: validate-pkg (in bundles/1.7.0-dev/validate-pkg)
Congratulations! "./pkg/..." is safely isolated from internal code.
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 9465272c281c602c758e51ed99f344c0686a899a
Component: engine
2015-06-12 12:28:23 -07:00
84b8fc6fe1 Moving man pages out of docs
Adding in other areas per comments
Updating with comments; equalizing generating man page info
Updating with duglin's comments
Doug is right here again;fixing.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: eacae64bd89ccc95a6db7bda76d36014e71e70ac
Component: engine
2015-06-10 13:43:35 -07:00
9a7bae36c0 ugh typo in hack scripts fix, introduced by 2b4facdf
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: c5f49886fa1a7ce67ab020a19c4aea65225c3658
Component: engine
2015-06-10 11:00:59 -07:00
6f7de6a8db Merge pull request #12583 from Mic92/hack/explicit-bundles
Hack/explicit bundles
Upstream-commit: ceee2595b6b38ec2f7fb01436884b41902acfecc
Component: engine
2015-06-09 14:34:52 -07:00
aeb5ca3cb3 hack: explicit bundles for integration-cli prequisites
no longer load hide critical code such as in .integration-daemon-{start,stop},
if this step failed, it will had logged the corresponding module before:

---> Making bundle: .integration-daemon-start (in bundles/1.7.0-dev/daemon-start)

which is nicer to debug.

This will make it also easier to execute a single tests in an interactive shell.

$ make shell
docker> . hack/make.sh binary .integration-daemon-start .integration-daemon-setup
docker> docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED STATUS              PORTS               NAMES
docker> go test github.com/docker/docker/integration-cli

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 2b4facdf2ed6b1074a2a8abc031bf0827b6d5f33
Component: engine
2015-06-09 07:22:26 +02:00
67f2667620 Merge pull request #13022 from Microsoft/10662-addrsrc
Windows: Add resources for manifest and icon
Upstream-commit: a2ab067b3c56f6b296150531c94a05b357fc0d70
Component: engine
2015-06-08 15:16:10 -07:00
b199d8e0f8 Windows: Build docker.exe manifested and with icon
Signed-off-by: John Howard <John.Howard@microsoft.com>
Upstream-commit: fd935ee63db31e73b5ee5594644e04b959ead374
Component: engine
2015-06-04 11:49:10 -07:00
e4dcd8eb99 Tiny spelling issue in the debian control file :)
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 318defe1de8a9d2930d784306fd024c59e21a8c5
Component: engine
2015-06-04 18:16:24 +10:00
4e0d41c20f Merge pull request #13704 from tianon/build-utc
Swap build-* to use UTC instead of local time
Upstream-commit: ef3e956aa2c8b24fd18c7fa693b366be781fc30a
Component: engine
2015-06-03 22:05:09 -07:00
961db33814 Update urls from .com to .org.
I added 301 redirects from dockerproject.com to dockerproject.org but may as
well make sure everything is updated anyways.

Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 7943bce8942ee8c262180652951216d963fa6202
Component: engine
2015-06-03 13:28:47 -07:00
77c62581e8 Swap build-* to use UTC instead of local time
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: aa54a93f749e2048957eb28e6045770672cb8838
Component: engine
2015-06-03 09:56:46 -07:00
d3e3277a8e Merge pull request #13603 from tianon/consistent-dest
Make "DEST" a make.sh construct instead of ad-hoc
Upstream-commit: 0ea14e5c6d5cd731715b53f6971faef45cd06cd3
Component: engine
2015-05-30 16:42:10 -07:00
c50b83a729 Make "DEST" a make.sh construct instead of ad-hoc
Using "DEST" for our build artifacts inside individual bundlescripts was already well-established convention, but this officializes it by having `make.sh` itself set the variable and create the directory, also handling CYGWIN oddities in a single central place (instead of letting them spread outward from `hack/make/binary` like was definitely on their roadmap, whether they knew it or not; sneaky oddities).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: ac3388367b6493987cef8017774fa4cdb5d2098f
Component: engine
2015-05-30 11:16:43 -07:00
efadb1b4ee Finally add precise/12.04 as a build-deb target
Ubuntu Precise has a number of warts that made it non-trivial to add initially, but I've managed to work through some of them and come up with a working build.  Two important parts to note are that it has neither the `btrfs` nor the `devicemapper` graphdriver backends since `btrfs-tools` and `libdevmapper-dev` in the precise repositories are too ancient for them to even compile.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 98180b89543396c07c1f1ea420554fbcce31c513
Component: engine
2015-05-29 12:55:58 -07:00
78d72e0857 add unshare apparmor profile test
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 6f75dd85c5adbced787a2e15aa7e9ccd71289749
Component: engine
2015-05-20 14:06:00 -07:00
1c502870b7 Make which cross binary fails clearer
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0bdeef94c7268e0816528423898b1daefe195d89
Component: engine
2015-05-15 09:25:13 -07:00
01977b40d0 integration: add variable to set storage options for testing
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 30f3bd643d5f6706bbaa9559e781b036661f149e
Component: engine
2015-05-08 17:49:39 +02:00
eb6a693474 Merge pull request #13032 from jfrazelle/nano-nano-nano
add nanorc to packaged builds
Upstream-commit: 6a1f862e40001b3389970b57ea38f718d4748881
Component: engine
2015-05-07 17:35:03 -06:00
159968801d Merge pull request #13065 from tianon/fix-build-deb-tilde-expansion
Fix '~' expansion in build-deb... (properly this time)
Upstream-commit: b6448f25f2fda3518d36b5a49fd67064cff2c952
Component: engine
2015-05-07 16:24:33 -07:00
72be67236b add nanorc to packaged builds
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: f66d225427d135069e1fd1e9649bc5654a0f675c
Component: engine
2015-05-07 16:10:07 -07:00
2ee6387cbc Merge pull request #12165 from icecrime/optional_userland_proxy
Optional userland proxy
Upstream-commit: 74bfa3675353aaf10ca760e82a79d758bea0ff6b
Component: engine
2015-05-07 14:01:16 -07:00
23e06861d0 Fix '~' expansion in build-deb... (properly this time)
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 297cd347a676a79dee94509de7669919a4d9fab3
Component: engine
2015-05-07 14:02:21 -06:00
a1ac14178e Fix build-deb
This fixes the part of #12996 that I forgot. 👼

This also fixes a minor path issue (there's no `libexec` in Debian), and fixes a minor bug with the `debVersion` parsing.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 867eed8f3586c81b32dc9f85208692e9e1c9909a
Component: engine
2015-05-06 18:10:15 -06:00
898f9341bc Merge pull request #12917 from jfrazelle/add-rpm
Add RPM for centos-7, fedora-20, fedora-21
Upstream-commit: 2281d6c266e87264d885314e2c4641ece725b161
Component: engine
2015-05-05 17:31:21 -07:00
0017c3b28a Add rpm for centos-6, centos-7, fedora-20, fedora-21
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: 18beb5561140aaa950f00391a87bb332fb2b6aea
Component: engine
2015-05-05 16:05:30 -07:00
ae45d9cbea Make a docker-in-docker dynamic binary and add RPM target
This change adds a new docker-in-docker dynamic binary make target which
builds a centos container for creating the dynamically linked binary.
To use it, you first must create the static binary and then call the
dind-dynbinary target.  You can call it like:

$ hack/make.sh binary dind-dynbinary rpm

This would then package the dynamic binary into the rpm after having
created it in the centos build container.  Unfortunately with this approach
you can't create the rpms and the debs with the same command.  They have to
be created separately otherwise the wrong version (static vs. dynamic) gets
packaged.

Various RPM fixes including:
  - Adding missing RPM dependencies.
  - Add sysconfig configuration files to the RPM.
  - Add an epoch to silence the fpm warning.
  - Remove unnecessary empty package.

Signed-off-by: Patrick Devine <patrick.devine@docker.com>
Signed-off-by: Chad Metcalf <chad@docker.com>
Upstream-commit: 878dcb89f38e8eb7bb07ccd4a4e5ce622252ff30
Component: engine
2015-05-05 10:01:39 -07:00