Commit Graph

33 Commits

Author SHA1 Message Date
Avi Deitcher
76f4802ccf additional volume support in building
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-10-01 15:27:55 +03:00
Avi Deitcher
2af30c5503 support cmdline-driven debugging mode for runc
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-22 15:14:35 +03:00
Avi Deitcher
b953d1781c add support for volumes
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-21 17:48:38 +03:00
Avi Deitcher
06a05badf6 template in yaml file
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-02-23 15:43:45 +02:00
David Scott
46ea02f65b moby: device "all" will add to the cgroup whitelist
After the runc security advisory[1] the default cgroup device
whitelist was changed.

In previous versions every container had "rwm" (read, write, mknod)
for every device ("a" for all). Typically this was overridden by
container engines like Docker. In LinuxKit we left the permissive
default.

In recent `runc` versions the default allow-all rule was removed,
so a container can only access a device if it is specifically
granted access, which LinuxKit handles via a device: entry.

However it is inconvenient for pkg/format, pkg/mount, pkg/swap
to list all possible block devices up-front. Therefore we add the
ability to grant access to an entire class of device with a single
rule:

```
- path: all
  type: b
```

Obviously a paranoid user can still override this with a specific
major/minor number in a device: rule.

[1] https://github.com/opencontainers/runc/security/advisories/GHSA-g54h-m393-cpwq

Signed-off-by: David Scott <dave@recoil.org>
2021-10-14 16:14:21 +01:00
David Scott
24db42dd68 moby: add a Devices array to the image yml
According to https://github.com/linuxkit/linuxkit/pull/3684#issuecomment-860128095

runc removed the console as a default device, so now it must be specified
explicitly in the OCI config.

See 60e21ec26e

The similar code in moby/moby is here: https://github.com/moby/moby/blob/master/oci/devices_linux.go

This patch allows packages to declare a `devices` array, which can contain `/dev/console` etc.

Signed-off-by: David Scott <dave@recoil.org>
2021-10-14 16:14:05 +01:00
Dave Tucker
561ce6f4be Remove Notary and Content Trust
This commit removes Notary and Content Trust.
Notary v1 is due to be replaced with Notary v2 soon.
There is no clean migration path from one to the other.
For now, this removes all signing from LinuxKit.
We will look to add this back once a new Notary alternative
becomes available.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2021-03-30 14:51:11 +01:00
Avi Deitcher
0b7502f130 pull and cache images locally without docker
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-12-30 18:27:02 +02:00
Avi Deitcher
bcd36a4661 support merge yaml flags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-05-18 17:41:36 +03:00
Rolf Neugebauer
5dcb3d48cb docs: Update documentation regarding private repos
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-20 14:35:45 +01:00
Justin Cormack
2dd65d27b6 Add support for setting containerd namespace in runtime config
This adds a namespace field to override the LinuxKit containerd
default namespace, in case you want to run a container in another
namespace.

Needs a patch in LinuxKit to implement this that I will open soon.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-17 14:12:15 +00:00
Justin Cormack
929a837d65 Add support for OCI annotations
Annotations do not do anything by default but get passed through to the runtime,
which can be useful. I never metadata I didn't like...

Also fix sysctl to be a map in the validation, not an array. I can't see any
examples using this in LinuxKit, but this matches OCI so is correct.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-17 12:26:08 +00:00
Rolf Neugebauer
1d995e198a docs: Document the 'ucode' kernel option.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-15 16:49:43 +00:00
Justin Cormack
eceb6d11f8
Merge pull request #181 from justincormack/runtime-cgroups
Add Cgroups to runtime config
2017-11-17 14:12:08 +00:00
Justin Cormack
c9bb1ecdf1 Add Cgroups to runtime config
This will create the list of cgroups specified

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-17 13:22:38 +00:00
Tristan Slominski
11c90c4cdb Prob: Files section does not work for /var dir
Solv: Updated documentation to point out limits of
files section regarding /var, /run, and /tmp dirs.

Signed-off-by: Tristan Slominski <tristan.slominski@gmail.com>
2017-11-14 15:08:07 -06:00
Alexander Slesarev
76c36afc60 Updated the documentation regarding binds options.
Signed-off-by: Alexander Slesarev <alex.slesarev@gmail.com>
2017-10-10 08:51:08 +10:00
Ian Campbell
2f01ab25ed Correct example yaml
Without the space I get:

    FATA[0000] Invalid config: yaml: line 66: could not find expected ':'

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-18 15:13:32 +01:00
Justin Cormack
ee0901762f Add support for mount in runtime config
This could be used in LinuxKit now, as there are some examples, eg
https://github.com/linuxkit/linuxkit/blob/master/blueprints/docker-for-mac/base.yml#L33
which are creating containers to do a mount.

The main reason though is to in future change the ad hoc code that generates
overlay mounts for writeable containers with a runtime config which does
the same thing; this code needs to create both tmpfs and overlay mounts.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-22 15:17:54 +01:00
Justin Cormack
ea60eff557 Add support for runtime configuration
This adds a `runtime` section in the config that can be used
to move network interfaces into a container, create directories,
and bind mount container namespaces into the filesystem.

See also https://github.com/linuxkit/linuxkit/pull/2413

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-17 17:36:49 +01:00
Justin Cormack
13a1ffdd44 Add Cgroup resource limits into Yaml spec
This adds all the cgroup restrictions into the spec.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-08-09 16:39:10 +01:00
Justin Cormack
6eb74b2f2b Add support for onshutdown
This is a list of images to run on a clean shutdown. Note that you must not rely on these
being run at all, as machines may be be powered off or shut down without having time to run
these scripts. If you add anything here you should test both in the case where they are
run and when they are not. Most systems are likely to be "crash only" and not have any setup here,
but you can attempt to deregister cleanly from a network service here, rather than relying
on timeouts, for example.

Fix https://github.com/linuxkit/linuxkit/issues/1988

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-18 13:55:52 +01:00
Justin Cormack
760521e197 Document metadata in files section
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-17 15:40:07 +01:00
Justin Cormack
cc33e67492 Allow uid, gid fields to be numeric or names
Previously I was forcing them to be strings, which is horrible. Now you
can either specify a numeric uid or the name of a service to use the
allocated id for that service.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-14 16:57:12 +01:00
Justin Cormack
830be373da Allow specifying the kernel and tarball names, or omitting tarball
fix #113

Use `tar: none` or `tar: ""` to omit the tarball.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-14 14:09:42 +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
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
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
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
eea5c6f126 Updates to the docs
Some of this was out of date or missing.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-08 15:45:49 +01:00
Justin Cormack
0eb4a49b24 Import yaml documentation from LinuxKit
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-08 14:58:29 +01:00