Lantao Liu
34319e025f
Merge pull request #221 from ijc/writeable-rootfs-snapshot
...
Always use a writeable snapshot as the rootfs.
2017-09-06 15:10:28 -07:00
Ian Campbell
0161764ef5
Always use a writeable snapshot as the rootfs.
...
This will be made readonly by runc based on spec.Root.Readonly (which we
already set correctly) but defering until then gives runc the chance to make
any missing mount points as it processes the spec.Mount array.
This is necessary because many container images lack mount points for things
like the /etc/hosts which we want to overbind. This is not noticed with e.g.
Docker because it automatically creates an additional layer containing those.
This is something we may want to do here as well eventually but for now using a
writeable snapshot is both necessary and sufficient.
The same does not apply to the sandbox since we never modify its rootfs or want
to mount anything in it etc, add a comment to clarify.
Fixes #220 .
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-06 22:20:14 +01:00
Lantao Liu
e06c2c59e0
Merge pull request #179 from Random-Liu/checkpoint-container-status
...
Checkpoint container status onto disk.
2017-09-06 13:51:38 -07:00
Lantao Liu
8569fa366e
Merge pull request #215 from Random-Liu/add-capability-all
...
Add "ALL" capabilities support.
2017-09-05 18:14:36 -07:00
Lantao Liu
d02ecc4673
Add "ALL" capabilities support.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-06 00:05:08 +00:00
Ian Campbell
1dea8fdfc4
Handle environment variables which containe spaces
...
This avoids errors such as:
spec: invalid environment variable "JAVA_OPTS=-Djava.security.egd=file:/dev/urandom"
use SplitN(2) to get the envvar name and value while allowing the value to
contain `=`.
Add some variables to the test data which have one or more `=` in the value.
Since this makes the resulting list of variables to check rather long split the
check in two and check the container config and image config derived values
independently.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-05 23:06:07 +01:00
Mike Brown
4f442de959
adds support for AppArmor
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-09-01 18:08:34 -05:00
Yanqiang Miao
0c3304e006
Support selinux options/label
...
Support selinux optios/label
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-31 19:20:12 +08:00
Lantao Liu
ac4f238f48
Cleanup image operations.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-31 00:52:09 +00:00
Lantao Liu
130aa5ac0d
Checkpoint container status onto disk.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-31 00:41:52 +00:00
Lantao Liu
c4d95aa2c4
Fix sandbox container snapshotter.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-30 18:33:59 +00:00
Lantao Liu
3f4978b77b
Use rbind and rprivate in bind mount.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-30 01:40:03 +00:00
Lantao Liu
55ee423224
Merge pull request #175 from Random-Liu/disable-pid-ns-sharing
...
Disable pid namespace sharing
2017-08-29 13:14:18 -07:00
Lantao Liu
b73161627d
Fix fifo files leakage.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-28 21:14:35 +00:00
Lantao Liu
f46cd1a71a
Disable pid namespace sharing
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-28 05:44:46 +00:00
Lantao Liu
270e09ab26
Use containerd WithUserID.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 21:11:56 +00:00
Lantao Liu
980e8e8007
Merge pull request #168 from Random-Liu/add-run-as-user
...
Add RunAsUser support
2017-08-25 13:45:47 -07:00
Lantao Liu
60d8430ac1
Do not checkpoint sandbox pid.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 01:38:05 +00:00
Lantao Liu
a80df151d1
Add RunAsUsername support.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 00:47:35 +00:00
Lantao Liu
e1f74f00a5
Various security related fixes
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-24 21:52:30 +00:00
Lantao Liu
73bb9696e8
Merge pull request #151 from Random-Liu/add-instrumented-service
...
Add instrumented service.
2017-08-24 11:26:39 -07:00
zhangzhenhao
331e542c09
add the user id support of runAsUser
...
Signed-off-by: zhangzhenhao <zhangzhenhao@outlook.com>
2017-08-24 23:29:45 +08:00
Lantao Liu
2faa665eb2
Merge pull request #155 from miaoyq/support-nonewprivileges
...
Support NoNewPrivileges
2017-08-23 20:58:38 -07:00
Yanqiang Miao
1aec120d5f
Support NoNewPrivileges
...
fixes #117
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-24 08:37:40 +08:00
Lantao Liu
45ee2e554a
Add container attach support.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 23:48:31 +00:00
Lantao Liu
77b703f1e7
Move generateID to util.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 23:46:55 +00:00
Lantao Liu
dd6e9fb88d
Merge pull request #156 from yanxuean/metalabel
...
Checkpoint and restart recovery
2017-08-23 15:36:19 -07:00
yanxuean
d2757cb8f9
Checkpoint and restart recovery
...
fix part of #120
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-08-23 17:01:13 +08:00
Lantao Liu
195b52500f
Add instrumented service.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-23 07:02:12 +00:00
Yanqiang Miao
8adad23015
Group all privileged logic together
...
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-22 09:16:37 +08:00
Abhinandan Prativadi
32e0313418
Containerd client integration
...
This commit:
1) Replaces the usage of containerd GRPC APIs with the containerd client for all operations related to containerd.
2) Updated containerd to v1.0alpha4+
3) Updated runc to v1.0.0
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-08-16 14:43:22 -07:00
Lantao Liu
2427d332f0
Add TERM=xterm when tty=true.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-11 16:53:40 +00:00
Yanqiang Miao
9cc93886ea
Replace the original default spec with containerd default spec
...
The original default spec contain `seccomp` configuration,
but some OS do not support this feature, such as ubuntu14.04,
and `make test-cri` always fail. The containerd default spec dosen't
contain `seccomp`, so I think we could replace the default spec
with containerd default spec.
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-10 20:31:03 +08:00
Lantao Liu
4c5cea9258
Handle device symlink.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-08 00:53:15 +00:00
Mike Brown
73748840da
Swicth to 1.0.0-alpha2 containerd api.
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-08-02 23:21:37 +00:00
Lantao Liu
7b16a35287
Use new metadata store.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-07-28 23:35:31 +00:00
Lantao Liu
4317e6119a
Remove sandbox truncindex.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-07-28 23:35:31 +00:00
Random-Liu
b398a161de
Get runtime spec from container metadata.
...
Signed-off-by: Random-Liu <lantaol@google.com>
2017-07-28 16:26:20 +00:00
Lantao Liu
faf592069b
Remove out-of-date TODOs.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-30 01:19:51 +00:00
Lantao Liu
862d00a21c
Update CRI to d779e9c9561b732adf06263c5424889e7564fdbd.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-21 01:56:13 +00:00
Lantao Liu
9b79201aa5
Add ExecSync.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 22:28:48 +00:00
Lantao Liu
cb9e104cf1
Create/delete containerd containerd
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 16:43:13 +00:00
Lantao Liu
bad279e0f6
Finish snapshot support.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 02:34:43 +00:00
Mike Brown
484a326717
modify code to compile on updated containerd
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-06-15 23:14:21 +00:00
Lantao Liu
80c973a550
Ensure container rootfs and apply image config
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-05-31 01:18:22 +00:00
Crazykev
49e7ef2153
update kubernetes vendor for new CRI change
...
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-05-24 10:25:55 +08:00
Random-Liu
6ac71e5862
Add initial container implementation.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-05-22 19:14:09 +00:00
Random-Liu
f2925f58ac
Add initial code framework
2017-04-14 19:04:26 -07:00