Commit Graph

300 Commits

Author SHA1 Message Date
Justin Cormack
75cc04a03d Merge pull request #109 from justincormack/contributing
Add Contributing doc
2017-07-12 12:20:14 +01:00
Justin Cormack
b4804b69e8 Add Contributing doc
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-12 12:04:33 +01:00
Justin Cormack
51b4e20154 Merge pull request #103 from ijc/master
Build for Darwin and Windows
2017-07-11 11:07:36 +01:00
Ian Campbell
6c6499bdd5 Update docker/docker vendor to 6978a6e25a2e6063f280ec842bd0f3eae99426e1
This includes https://github.com/moby/moby/pull/34040 which fixes Windows build
issues.

Note that this pulls in more than 500 (non merge) commits as well as the fix we
are interested in. A couple of new deps are pulled in, versions taken from
vendor/github.com/docker/docker/vendor.conf.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-11 10:47:39 +01:00
Justin Cormack
5bf74cbfa9 Merge pull request #105 from justincormack/unique-names
Error if there are duplicate service names
2017-07-11 10:22:05 +01:00
Justin Cormack
3ee4fdc43a Error if there are duplicate service names
Continue to allow onboot to have duplicates as we do not run simultaneously
so that is ok (and we number them anyway), but services are run together
so we will get a runtime error if duplicated as this is the containerd/runc
id.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-10 14:50:04 +01:00
Ian Campbell
3c5fad4539 Remove dependency on docker/docker/cli
We were pulling in this whole stack of packages just for `trust.ReleasesRole`.
Just define it locally.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-10 14:38:21 +01:00
Justin Cormack
ec7e73b304 Merge pull request #100 from justincormack/userns
Add partial user namespace support
2017-07-10 14:30:30 +01:00
Ian Campbell
5e75f8ca8b Only run go test and go vet if not cross building (i.e. ${GOOS} unset)
They will try to run things and hence cannot be done when cross building.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-07 10:27:19 +01:00
Ian Campbell
48f1dd042f Build for Darwin and Windows in CI
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-06 17:51:43 +01:00
Justin Cormack
d87a3f9990 Merge pull request #102 from ijc/master
revendor runc + runtime-spec to match containerd 8e1a04ff9ee3
2017-07-06 16:57:01 +02:00
Ian Campbell
c3edfec759 revendor runc + runtime-spec to match containerd 8e1a04ff9ee3
Note that various fields have changed moved around in the JSON as a result:

* `Platform` has been removed.
* `Process` is now a pointer.
* `OOMScoreAdj` has moved into `Process`, from `Linux.Resources` (resolving a
  TODO here).

Also updates golang.org/x/sys which is less critical.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-06 15:34:01 +01:00
Justin Cormack
a73c3d3667 Add partial user namespace support
This adds the OCI parts needed into the yaml, but there are still
permissions issues in practise so marked as experimental.

It may just need further documentation to resolve the issues.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-03 14:45:58 +01:00
Justin Cormack
c7c4c9ef2a Merge pull request #98 from justincormack/named-uids
Assign each container a uid and gid it can use
2017-06-30 19:40:47 +01:00
Justin Cormack
0acaaa71fe Assign each container a uid and gid it can use
In order to support not running containers as root, allocate
each of them a uid and gid, a bit like traditional Unix system
service IDs. These can be referred to elsewhere by the name of
the container, eg if you wish to create a file owned by a
particular esrvice.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 17:40:08 +01:00
Justin Cormack
e9b9c56137 Merge pull request #99 from justincormack/ambient-docs
Add docs for ambient capabilities
2017-06-30 17:17:46 +01:00
Justin Cormack
c5070dfc8c Add docs for ambient capabilities
Missed in intitial PR.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 17:05:34 +01:00
Justin Cormack
5f49f6695a Merge pull request #97 from justincormack/ambient
Add support for ambient capabilities
2017-06-30 14:41:40 +01:00
Justin Cormack
66b4aed239 Add support for ambient capabilities
Allow setting ambient capabilities, as a seperate option to the standard
ones. If you are running as a non root user you should use these.

Note that unless you add `CAP_DAC_OVERRIDE` and similar permissions you
need to be careful about file ownership. Added support to set ownership
in the `files` section to help out with this.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-30 14:08:16 +01:00
Justin Cormack
70c5c2e1a0 Merge pull request #94 from davefreitag/ibm-vhd
Adding 'dynamic-vhd' Output Format
2017-06-27 15:29:20 +01:00
Justin Cormack
518fd2b0d6 Merge pull request #93 from tych0/check-caps
check that caps are valid
2017-06-27 15:28:52 +01:00
Tycho Andersen
c2e460fee5 check that caps are valid
Rather than build the image and have something weird happen, let's check
that the capabilities specified are actually valid capabilities.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-27 08:25:10 -06:00
Dave Freitag
b605e61d1f Adding dynamic-vhd Output Format
Adding support for the dynamic-vhd output format.

Signed-off-by: Dave Freitag <dcfreita@us.ibm.com>
2017-06-27 08:53:56 -05:00
Justin Cormack
31384b6780 Merge pull request #91 from justincormack/library
Split out into a small stub command line and a library
2017-06-23 11:58:18 -07:00
Justin Cormack
e7ebabdb05 Split out into a small stub command line and a library
- this is pretty much the smallest change to split this out and it
  exposes a few things that can be improved later
- no change to logging yet

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-21 16:19:31 -07:00
Justin Cormack
a7e3fd29b4 Merge pull request #90 from justincormack/dockerinput
Rename the docker run function
2017-06-21 11:17:07 -07:00
Justin Cormack
4401e7d0f0 Rename the docker run function
This is a remnant of when there were multiple versions.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-21 11:10:38 -07:00
Justin Cormack
c9d8739b32 Merge pull request #86 from justincormack/error
Return errors from build internal function
2017-06-20 20:16:42 -07:00
Justin Cormack
c5cccad62e Return errors from build internal function
This makes it easier to convert to a library.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-20 17:25:16 -07:00
Justin Cormack
7149b0f7b8 Merge pull request #85 from justincormack/empty
Allow creation of empty files
2017-06-20 13:34:09 -07:00
Justin Cormack
618dc424de Allow creation of empty files
- change to a pointer type so we can distinguish empty from unset.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-20 13:25:36 -07:00
Justin Cormack
b928a9b203 Merge pull request #84 from justincormack/rlimit
Add support for rlimits
2017-06-18 15:37:04 -07:00
Justin Cormack
ad3de8f858 Add support for rlimits
Use a microformat eg `nofile,100,200`. You can use `unlimited`
to set no limit.

Needed for https://github.com/linuxkit/linuxkit/issues/1852

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-17 16:37:24 -07:00
Justin Cormack
2e22b3adc6 Merge pull request #83 from justincormack/hyperkit-support
Use hyperkit to make raw disks
2017-06-15 16:31:59 -07:00
Justin Cormack
13da5e08ea Use hyperkit to make raw disks
- enable the hyperkit option by default on MacOS
- use it for creating raw disk images

fix #68

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-15 15:10:55 -07:00
Justin Cormack
d8cc1b3f08 Merge pull request #82 from justincormack/source-ifpresent
Allow some files specified with `source` to be optional
2017-06-15 11:22:21 -07:00
Justin Cormack
4d64a46ae9 Allow some files specified with source to be optional
See discussion in https://github.com/linuxkit/linuxkit/pull/2027

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-15 11:07:58 -07:00
Justin Cormack
d534273407 Merge pull request #81 from ijc/no-default-hostname
Do not force default hostname `moby`.
2017-06-13 17:42:18 +02:00
Ian Campbell
755c6a0bf7 Do not force default hostname moby.
This disables the code in LinuxKit's `/bin/rc.init` which attempts to detect an
unconfigured hostname and generate a unique (ish) version from the MAC address.

Anyone who wants a specific fallback hostname can populate `etc/hostname`
through the `files` stanza in their `yml` file.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-06-13 16:37:42 +01:00
Justin Cormack
464396c63f Merge pull request #80 from justincormack/http-fetch-yaml
Add support to fetch yaml file with http
2017-06-13 16:58:51 +02:00
Justin Cormack
d7ca674ea6 Add support to fetch yaml file with http
For example you can do
```
moby build https://raw.githubusercontent.com/linuxkit/linuxkit/master/linuxkit.yml
```

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 18:11:21 +02:00
Justin Cormack
90fd3e7e41 Merge pull request #79 from justincormack/tilde
Allow ~ for home directory when specifying source of file
2017-06-12 16:43:28 +02:00
Justin Cormack
1988b312d2 Allow ~ for home directory when specifying source of file
Useful when adding ssh keys

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 16:37:00 +02:00
Justin Cormack
e94d0d8093 Merge pull request #78 from justincormack/add-initrd
Move the initrd library to this repo
2017-06-12 15:43:47 +02:00
Justin Cormack
322d06f906 Update vendoring to use initrd library from this repo
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:36:30 +02:00
Justin Cormack
528b430789 Clean up initrd creation library
Remove duplicated code and clean up file handling a little.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:30 +02:00
Justin Cormack
ddc92b8846 Code in the initrd generator to split a single tarball
In the WIP code in `moby` we now have a standard base tarball format,
that includes the kernel and cmdline as files in `/boot` so that the
entire output of the yaml file can default to a single tarball. Then
this can be split back up by LinuxKit into initrd, kernel and cmdline
as needed. This will probably become the only output of the `moby build`
stage, with a `moby package` stage dealing with output formats.

We may remove the output format specification from the yaml file as well,
and just have it in the command.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:22 +02:00
Justin Cormack
ecf14815f7 Update Go path to linuxkit/linuxkit for libraries
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:34:11 +02:00
Tycho Andersen
c313e39250 init: fake supporting hard links slightly differently
Instead, make a hard link a symlink. This isn't much better, but it allows
some cases (e.g. installing GCC on moby via alpine) to work.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-12 15:34:02 +02:00
Justin Cormack
6bce274b81 Move Go code to src/cmd
This does not get everything where we want it finally, see #1266
nor the optimal way of building, but it gets it out of top level.

Added instructions to build if you have a Go installation.

Not moving `vendor` yet.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 15:33:53 +02:00