commit | 0072f4c6f18093d0395181c6fa21be3e0e300d13 | [log] [tgz] |
---|---|---|
author | Jess Frazelle <acidburn@google.com> | Fri Aug 04 14:46:52 2017 -0400 |
committer | Jess Frazelle <acidburn@google.com> | Fri Aug 04 14:46:52 2017 -0400 |
tree | 3b618afb36965d2d09d3f210c9493579098b3bc1 | |
parent | d46d3da31d84ddf1508ae63518050db152daf245 [diff] |
add chroot Signed-off-by: Jess Frazelle <acidburn@google.com>
Container introspection tool. Find out what container runtime is being used as well as features available.
$ go get github.com/jessfraz/amicontained
$ amicontained -h _ _ _ _ __ _ _ __ ___ (_) ___ ___ _ __ | |_ __ _(_)_ __ ___ __| | / _` | '_ ` _ \| |/ __/ _ \| '_ \| __/ _` | | '_ \ / _ \/ _` | | (_| | | | | | | | (_| (_) | | | | || (_| | | | | | __/ (_| | \__,_|_| |_| |_|_|\___\___/|_| |_|\__\__,_|_|_| |_|\___|\__,_| Container introspection tool. Version: v0.0.7 -d run in debug mode -v print version and exit (shorthand) -version print version and exit
Docker
$ docker run --rm -it r.j3ss.co/amicontained Container Runtime: docker Host PID Namespace: false AppArmor Profile: docker-default (enforce) User Namespace: true User Namespace Mappings: Container -> 0 Host -> 886432 Range -> 65536 Capabilities: BOUNDING -> chown dac_override fowner fsetid kill setgid setuid setpcap net_bind_service net_raw sys_chroot mknod audit_write setfcap Chroot/PivotRoot: true $ docker run --rm -it --pid host r.j3ss.co/amicontained Container Runtime: docker Host PID Namespace: true AppArmor Profile: docker-default (enforce) User Namespace: false Capabilities: BOUNDING -> chown dac_override fowner fsetid kill setgid setuid setpcap net_bind_service net_raw sys_chroot mknod audit_write setfcap Chroot/PivotRoot: true $ docker run --rm -it --security-opt "apparmor=unconfined" r.j3ss.co/amicontained Container Runtime: docker Host PID Namespace: false AppArmor Profile: unconfined User Namespace: false Capabilities: BOUNDING -> chown dac_override fowner fsetid kill setgid setuid setpcap net_bind_service net_raw sys_chroot mknod audit_write setfcap Chroot/PivotRoot: true
lxc
$ lxc-attach -n xenial root@xenial:/# amicontained Container Runtime: lxc Host PID Namespace: false AppArmor Profile: none User Namespace: true User Namespace Mappings: Container -> 0 Host -> 100000 Range -> 65536 Capabilities: BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_tty_config mknod lease audit_write audit_control setfcap syslog wake_alarm block_suspend audit_read Chroot/PivotRoot: true $ lxc-execute -n xenial -- /bin/amicontained Container Runtime: lxc Host PID Namespace: false AppArmor Profile: none User Namespace: true User Namespace Mappings: Container -> 0 Host -> 100000 Range -> 65536 Capabilities: BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_tty_config mknod lease audit_write audit_control setfcap syslog wake_alarm block_suspend audit_read Chroot/PivotRoot: true
unshare
$ sudo unshare --user -r root@coreos:/home/jessie/.go/src/github.com/jessfraz/amicontained# ./amicontained Container Runtime: not-found Host PID Namespace: true AppArmor Profile: unconfined User Namespace: true User Namespace Mappings: Container -> 0 Host -> 0 Range -> 1 Capabilities: BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read Chroot/PivotRoot: false