22 Commits

Author SHA1 Message Date
74ee579375 Update kpod inspect to use the new container state
kpod inspect now uses the new libpod container state
and closely matches the output of docker inspect
some aspects of it are still WIP as the libpod container state
is still being worked on

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-12 09:46:23 -05:00
e64da85ccb Use debugf to allow parsing of format specifier
Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2017-12-12 00:13:44 +05:30
34696c55e9 Add Linux Root Propagation to kpod create and run
Add [r]shared, [r]private, [r]slave functionality to the --volume flag
for kpod create and kpod run
This sets the root propagation for each bind mount

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #87
Approved by: rhatdan
2017-12-05 10:23:13 +00:00
adf8809521 Add NetMode, UTSMode and IPCMode
Allow kpod create/run to create contianers in different network namespaces, uts namespaces and
IPC Namespaces.

This patch just handles the simple join the host, or another containers namespaces.

Lots more work needed to full integrate  --net

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #64
Approved by: mheon
2017-12-02 15:32:56 +00:00
742475885e kpod_start
Starts one or more containers.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #83
Approved by: rhatdan
2017-11-29 22:01:47 +00:00
ad255533d4 Fix --volume flag for kpod create and run
Enable the --volume flag to validate user input
and add functionality for :z and :Z options

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #84
Approved by: mheon
2017-11-29 21:40:12 +00:00
195d48d86d Copy some verification code out of Docker to verify user input
Added lots of verification code to make sure resourses asociated with
containers is correct.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #60
Approved by: umohnani8
2017-11-22 20:53:15 +00:00
bd4e106de3 Add support for pid ns
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #54
Approved by: umohnani8
2017-11-22 16:46:53 +00:00
91b406ea4a Need to block access to kernel file systems in /proc and /sys
Users of kpod run could use these file systems to perform a breakout
or to learn valuable system information.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #61
Approved by: mheon
2017-11-22 15:49:56 +00:00
c75c319ea2 Add support for oom functions
Add tests for oom-kill-disable and oom-kill-adj

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #52
Approved by: TomSweeneyRedHat
2017-11-21 15:33:16 +00:00
b4bc7b8828 Add cgroup fs by default
Docker defaults to mounting the cgroup file system.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #53
Approved by: mheon
2017-11-20 22:47:58 +00:00
5d52f74d21 Add support for Ulimits/Rlimits to kpod create/run
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #24
Approved by: mheon
2017-11-20 20:12:43 +00:00
57599f0075 Fix up handling of environment variables
The way docker works is if a user specifies a non `-e Name=Value`, IE
just a `-e Name`, then the environment variable Name from the clients
OS.ENV is used.

Also by default Docker containers run with the HOSTNAME environment set
to the HOSTNAME specified for the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #21
Approved by: baude
2017-11-20 16:25:31 +00:00
006a8bd6f3 Convert tmpfs mounts to use generate
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #19
Approved by: baude
2017-11-06 14:43:06 +00:00
402c30333f Remove defaults and use runtime-tools/generate for spec
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #19
Approved by: baude
2017-11-06 14:43:06 +00:00
dbd524e3d1 Merge pull request #17 from rhatdan/caps
Add support for Caps Options.
2017-11-05 17:06:25 -05:00
619637a919 Handle Linux Capabilities from command line
Had to revendor in docker/docker again, which dropped a bunch of packages

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-04 09:07:47 +00:00
aa19565d8d spec.go: Remove cli context as func arg
Remove cli context as a func arg to make unit tests
easier.

Signed-off-by: baude <bbaude@redhat.com>
2017-11-03 20:37:33 -05:00
098389dc3e Parse SecurityOpts
This should turn on handling of SELinux, NoNewPrivs, seccomp and Apparmor

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #15
Approved by: rhatdan
2017-11-03 20:55:10 +00:00
0847e770bb Fix lint error on spec being shadowed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-02 16:29:34 -04:00
92818fdfb7 Fix gofmt errors
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-02 15:30:39 -04:00
8cf07b2ad1 libpod create and run
patched version of the same code that went into crio

Signed-off-by: baude <bbaude@redhat.com>
2017-11-01 14:19:19 -05:00